diff --git a/src/service/rooms/state_accessor/mod.rs b/src/service/rooms/state_accessor/mod.rs index 697f7236c..89db88a63 100644 --- a/src/service/rooms/state_accessor/mod.rs +++ b/src/service/rooms/state_accessor/mod.rs @@ -287,7 +287,11 @@ impl Service { c.history_visibility }); - history_visibility == HistoryVisibility::WorldReadable + match history_visibility { + HistoryVisibility::Invited => self.services.state_cache.is_invited(user_id, room_id).await, + HistoryVisibility::WorldReadable => true, + _ => false, + } } /// Returns the state hash for this pdu.