1
0
Fork 0
forked from mirror/grapevine

Mark events as not visible when they're not found or in the wrong room

This commit is contained in:
Lambda 2024-08-30 22:18:50 +00:00
parent f965bf2b6a
commit 1ba96b9534

View file

@ -215,6 +215,14 @@ impl Service {
) -> Result<bool> {
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);
};