Allow state visibility for once-joined users when history_visibility=shared.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-09-02 08:33:00 +00:00
parent 4b49aaad53
commit 86781522b6

View File

@@ -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,
}
}