mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 14:33:10 -06:00
Server may still be nil
This commit is contained in:
parent
52a441a2ef
commit
d204c7a17c
|
|
@ -199,9 +199,11 @@ func (querier *Queryer) QueryNextRoomHierarchyPage(ctx context.Context, walker r
|
|||
func authorised(ctx context.Context, querier *Queryer, caller types.DeviceOrServerName, roomID spec.RoomID, parentRoomID *spec.RoomID) (authed, isJoinedOrInvited bool) {
|
||||
if clientCaller := caller.Device(); clientCaller != nil {
|
||||
return authorisedUser(ctx, querier, clientCaller, roomID, parentRoomID)
|
||||
} else {
|
||||
return authorisedServer(ctx, querier, roomID, *caller.ServerName()), false
|
||||
}
|
||||
if serverCaller := caller.ServerName(); serverCaller != nil {
|
||||
return authorisedServer(ctx, querier, roomID, *serverCaller), false
|
||||
}
|
||||
return false, false
|
||||
}
|
||||
|
||||
// authorisedServer returns true iff the server is joined this room or the room is world_readable, public, or knockable
|
||||
|
|
|
|||
Loading…
Reference in a new issue