mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 13:53:09 -06:00
Fix bugs
This commit is contained in:
parent
ede9da20dd
commit
ffc109e406
|
|
@ -47,7 +47,7 @@ func (c Caches) GetRoomServerStateKeyNID(stateKey string) (types.EventStateKeyNI
|
|||
}
|
||||
|
||||
func (c Caches) StoreRoomServerStateKeyNID(stateKey string, nid types.EventStateKeyNID) {
|
||||
c.RoomVersions.Set(stateKey, nid)
|
||||
c.RoomServerStateKeyNIDs.Set(stateKey, nid)
|
||||
}
|
||||
|
||||
func (c Caches) GetRoomServerEventTypeNID(eventType string) (types.EventTypeNID, bool) {
|
||||
|
|
@ -61,7 +61,7 @@ func (c Caches) GetRoomServerEventTypeNID(eventType string) (types.EventTypeNID,
|
|||
}
|
||||
|
||||
func (c Caches) StoreRoomServerEventTypeNID(eventType string, nid types.EventTypeNID) {
|
||||
c.RoomVersions.Set(eventType, nid)
|
||||
c.RoomServerEventTypeNIDs.Set(eventType, nid)
|
||||
}
|
||||
|
||||
func (c Caches) GetRoomServerRoomNID(roomID string) (types.RoomNID, bool) {
|
||||
|
|
@ -75,5 +75,5 @@ func (c Caches) GetRoomServerRoomNID(roomID string) (types.RoomNID, bool) {
|
|||
}
|
||||
|
||||
func (c Caches) StoreRoomServerRoomNID(roomID string, nid types.RoomNID) {
|
||||
c.RoomVersions.Set(roomID, nid)
|
||||
c.RoomServerRoomNIDs.Set(roomID, nid)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,6 @@ func (d *Database) RoomNIDExcludingStubs(ctx context.Context, roomID string) (ro
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
d.Cache.StoreRoomServerRoomNID(roomID, roomNID)
|
||||
}
|
||||
latestEvents, _, err := d.RoomsTable.SelectLatestEventNIDs(ctx, nil, roomNID)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue