mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +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> {
|
) -> Result<bool> {
|
||||||
let currently_member =
|
let currently_member =
|
||||||
services().rooms.state_cache.is_joined(user_id, room_id)?;
|
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
|
let history_visibility = self
|
||||||
.room_state_get(
|
.room_state_get(
|
||||||
|
|
@ -299,8 +301,11 @@ impl Service {
|
||||||
})
|
})
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok(currently_member
|
Ok(match history_visibility {
|
||||||
|| history_visibility == HistoryVisibility::WorldReadable)
|
HistoryVisibility::WorldReadable => true,
|
||||||
|
HistoryVisibility::Shared => once_member,
|
||||||
|
_ => currently_member,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the state hash for this pdu.
|
/// Returns the state hash for this pdu.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue