diff --git a/src/stores/room-list/previews/ReactionEventPreview.ts b/src/stores/room-list/previews/ReactionEventPreview.ts index d58f592feb..07fac107ca 100644 --- a/src/stores/room-list/previews/ReactionEventPreview.ts +++ b/src/stores/room-list/previews/ReactionEventPreview.ts @@ -22,8 +22,11 @@ import { _t } from "../../../languageHandler"; export class ReactionEventPreview implements IPreview { public getTextFor(event: MatrixEvent, tagId?: TagID): string { - const reaction = event.getRelation().key; - if (!reaction) return; + const relation = event.getRelation(); + if (!relation) return null; // invalid reaction (probably redacted) + + const reaction = relation.key; + if (!reaction) return null; // invalid reaction (unknown format) if (isSelf(event) || !shouldPrefixMessagesIn(event.getRoomId(), tagId)) { return reaction;