mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
allow seeing state from visibility=shared left rooms
This commit is contained in:
parent
52af998f7b
commit
857131e959
1 changed files with 7 additions and 2 deletions
|
|
@ -280,6 +280,8 @@ impl Service {
|
|||
) -> Result<bool> {
|
||||
let currently_member =
|
||||
services().rooms.state_cache.is_joined(user_id, room_id)?;
|
||||
let once_member =
|
||||
services().rooms.state_cache.once_joined(user_id, room_id)?;
|
||||
|
||||
let history_visibility = self
|
||||
.room_state_get(
|
||||
|
|
@ -299,8 +301,11 @@ impl Service {
|
|||
})
|
||||
})?;
|
||||
|
||||
Ok(currently_member
|
||||
|| history_visibility == HistoryVisibility::WorldReadable)
|
||||
Ok(match history_visibility {
|
||||
HistoryVisibility::WorldReadable => true,
|
||||
HistoryVisibility::Shared => once_member,
|
||||
_ => currently_member,
|
||||
})
|
||||
}
|
||||
|
||||
/// Returns the state hash for this pdu.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue