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