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
|
|
@ -269,7 +269,10 @@ func buildInviteStrippedState(
|
|||
for _, stateNID := range stateEntries {
|
||||
stateNIDs = append(stateNIDs, stateNID.EventNID)
|
||||
}
|
||||
stateEvents, err := db.Events(ctx, info, stateNIDs)
|
||||
if info == nil {
|
||||
return nil, types.ErrorInvalidRoomInfo
|
||||
}
|
||||
stateEvents, err := db.Events(ctx, info.RoomVersion, stateNIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue