From bc38545db827e3ed75b465f404c7a4b42eb5dda5 Mon Sep 17 00:00:00 2001 From: Brad Murray Date: Tue, 22 Aug 2023 14:18:40 -0400 Subject: [PATCH] Include m.sticker events in unencrypted rooms for previews --- synapse/storage/databases/main/beeper.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/synapse/storage/databases/main/beeper.py b/synapse/storage/databases/main/beeper.py index 1ec6e88bf2d9..68e6d020f981 100644 --- a/synapse/storage/databases/main/beeper.py +++ b/synapse/storage/databases/main/beeper.py @@ -62,10 +62,11 @@ def beeper_preview_txn(txn: LoggingTransaction) -> Optional[Tuple[str, int]]: AND e.room_id = ? AND is_edit.event_id IS NULL AND r.redacts IS NULL - AND ( - e.type = 'm.room.message' - OR e.type = 'm.room.encrypted' - OR e.type = 'm.reaction' + AND e.type IN ( + 'm.room.message', + 'm.room.encrypted', + 'm.reaction', + 'm.sticker' ) AND CASE -- Only find non-redacted reactions to our own messages