diff options
Diffstat (limited to 'roomserver/internal/helpers/auth.go')
-rw-r--r-- | roomserver/internal/helpers/auth.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/roomserver/internal/helpers/auth.go b/roomserver/internal/helpers/auth.go index 3d2beab3..24958091 100644 --- a/roomserver/internal/helpers/auth.go +++ b/roomserver/internal/helpers/auth.go @@ -219,7 +219,12 @@ func loadAuthEvents( eventNIDs = append(eventNIDs, eventNID) } } - if result.events, err = db.Events(ctx, roomInfo, eventNIDs); err != nil { + + if roomInfo == nil { + err = types.ErrorInvalidRoomInfo + return + } + if result.events, err = db.Events(ctx, roomInfo.RoomVersion, eventNIDs); err != nil { return } roomID := "" |