mirror of
https://github.com/matrix-construct/construct
synced 2024-10-01 05:08:59 +02: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.
|
// or for graceful forward compatibility. We default to "shared" here.
|
||||||
//assert(history_visibility == "shared");
|
//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
|
// An m::room instance with no event_id is used to query the room at the
|
||||||
// present state.
|
// present state.
|
||||||
const m::room present
|
const m::room present
|
||||||
|
@ -113,11 +118,6 @@ ircd::m::visible_to_user(const m::room &room,
|
||||||
room.room_id
|
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
|
return m::membership(present, user_id, m::membership_positive); // join || invite
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue