mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 13:22:26 +03:00
Only require room version instead of room info for db.Events() (#3079)
This reduces the API requirements for the Events database to align with what is actually required.
This commit is contained in:
parent
2b34f88fde
commit
a49c9f01e2
16 changed files with 74 additions and 36 deletions
|
@ -398,7 +398,10 @@ func (t *missingStateReq) lookupStateAfterEventLocally(ctx context.Context, even
|
|||
for _, entry := range stateEntries {
|
||||
stateEventNIDs = append(stateEventNIDs, entry.EventNID)
|
||||
}
|
||||
stateEvents, err := t.db.Events(ctx, t.roomInfo, stateEventNIDs)
|
||||
if t.roomInfo == nil {
|
||||
return nil
|
||||
}
|
||||
stateEvents, err := t.db.Events(ctx, t.roomInfo.RoomVersion, stateEventNIDs)
|
||||
if err != nil {
|
||||
t.log.WithError(err).Warnf("failed to load state events locally")
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue