From 98ede6437e8d0132bec7ebe61a0dd3cc375c2729 Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Sun, 5 Jan 2020 23:04:42 -0600 Subject: [PATCH] Use display name when pinned messages are changed Signed-off-by: Aaron Raimist --- src/TextForEvent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index c3c8396e26..2e79ff2044 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -473,7 +473,7 @@ function textForPowerEvent(event) { } function textForPinnedEvent(event) { - const senderName = event.getSender(); + const senderName = event.sender ? event.sender.name : event.getSender(); return _t("%(senderName)s changed the pinned messages for the room.", {senderName}); }