Allow state visibility for once-joined users when history_visibility=shared.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
4b49aaad53
commit
86781522b6
1 changed files with 6 additions and 1 deletions
|
|
@ -138,12 +138,17 @@ pub async fn user_can_see_state_events(&self, user_id: &UserId, room_id: &RoomId
|
|||
});
|
||||
|
||||
match history_visibility {
|
||||
| HistoryVisibility::WorldReadable => true,
|
||||
| HistoryVisibility::Shared =>
|
||||
self.services
|
||||
.state_cache
|
||||
.once_joined(user_id, room_id)
|
||||
.await,
|
||||
| HistoryVisibility::Invited =>
|
||||
self.services
|
||||
.state_cache
|
||||
.is_invited(user_id, room_id)
|
||||
.await,
|
||||
| HistoryVisibility::WorldReadable => true,
|
||||
| _ => false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue