mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +01:00
ircd:Ⓜ️:visible: Minor move conditional return before present room construction.
This commit is contained in:
parent
89be45b42f
commit
dd9157315c
1 changed files with 5 additions and 5 deletions
|
@ -106,6 +106,11 @@ ircd::m::visible_to_user(const m::room &room,
|
|||
// or for graceful forward compatibility. We default to "shared" here.
|
||||
//assert(history_visibility == "shared");
|
||||
|
||||
// If the room is not at the present event then we have to run another
|
||||
// test for membership here. Otherwise the "join" test already failed.
|
||||
if(!room.event_id)
|
||||
return false;
|
||||
|
||||
// An m::room instance with no event_id is used to query the room at the
|
||||
// present state.
|
||||
const m::room present
|
||||
|
@ -113,11 +118,6 @@ ircd::m::visible_to_user(const m::room &room,
|
|||
room.room_id
|
||||
};
|
||||
|
||||
// If the room is not at the present event then we have to run another
|
||||
// test for membership here. Otherwise the "join" test already failed.
|
||||
if(!room.event_id)
|
||||
return false;
|
||||
|
||||
return m::membership(present, user_id, m::membership_positive); // join || invite
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue