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
|
|
@ -805,7 +805,10 @@ func (r *Inputer) kickGuests(ctx context.Context, event gomatrixserverlib.PDU, r
|
|||
return err
|
||||
}
|
||||
|
||||
memberEvents, err := r.DB.Events(ctx, roomInfo, membershipNIDs)
|
||||
if roomInfo == nil {
|
||||
return types.ErrorInvalidRoomInfo
|
||||
}
|
||||
memberEvents, err := r.DB.Events(ctx, roomInfo.RoomVersion, membershipNIDs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue