From f84795ebaeefe3cf44d858ca9c2ffb25094371c3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 30 Jan 2020 20:50:12 +0000 Subject: [PATCH] Remove now unused code from TextForEvent --- src/TextForEvent.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index cdfea45ad7..d4003058c8 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -442,23 +442,6 @@ function textForHistoryVisibilityEvent(event) { } } -function textForEncryptionEvent(event) { - const senderName = event.sender ? event.sender.name : event.getSender(); - if (event.getContent().algorithm === "m.megolm.v1.aes-sha2") { - return _t('%(senderName)s turned on end-to-end encryption.', { - senderName, - }); - } - return _t( - '%(senderName)s turned on end-to-end encryption ' + - '(unrecognised algorithm %(algorithm)s).', - { - senderName, - algorithm: event.getContent().algorithm, - }, - ); -} - // Currently will only display a change if a user's power level is changed function textForPowerEvent(event) { const senderName = event.sender ? event.sender.name : event.getSender(); @@ -636,7 +619,6 @@ const stateHandlers = { 'm.room.member': textForMemberEvent, 'm.room.third_party_invite': textForThreePidInviteEvent, 'm.room.history_visibility': textForHistoryVisibilityEvent, - 'm.room.encryption': textForEncryptionEvent, 'm.room.power_levels': textForPowerEvent, 'm.room.pinned_events': textForPinnedEvent, 'm.room.server_acl': textForServerACLEvent,