diff --git a/src/service/rooms/state_accessor.rs b/src/service/rooms/state_accessor.rs index b9e9f702..5a15718e 100644 --- a/src/service/rooms/state_accessor.rs +++ b/src/service/rooms/state_accessor.rs @@ -215,6 +215,14 @@ impl Service { ) -> Result { let lookup = Lookup::VisibilityForUser; + let Some(pdu) = services().rooms.timeline.get_pdu(event_id)? else { + return Ok(false); + }; + + if pdu.room_id() != room_id { + return Ok(false); + } + let Some(shortstatehash) = self.pdu_shortstatehash(event_id)? else { return Ok(true); };