From a399b1018ae1aa18e815dcbccdf35222ec1571ed Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 27 Apr 2020 23:16:08 +0100 Subject: [PATCH] fix flashing `by ""` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/messages/RedactedBody.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/messages/RedactedBody.tsx b/src/components/views/messages/RedactedBody.tsx index 654f1622b1..e347e879a3 100644 --- a/src/components/views/messages/RedactedBody.tsx +++ b/src/components/views/messages/RedactedBody.tsx @@ -29,7 +29,7 @@ const RedactedBody = React.forwardRef(({mxEvent}, ref) => { let text = _t("Message deleted"); const redactedBecauseUserId = mxEvent.getUnsigned().redacted_because.sender; - if (redactedBecauseUserId !== cli.getUserId()) { + if (redactedBecauseUserId && redactedBecauseUserId !== cli.getUserId()) { const room = cli.getRoom(mxEvent.getRoomId()); const sender = room && room.getMember(redactedBecauseUserId); text = _t("Message deleted by %(name)s", { name: sender ? sender.name : redactedBecauseUserId });