From 064fb6e9a293c3afc4688c08d9c4807b6f2a8aef Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 6 Jul 2019 23:58:41 -0400 Subject: [PATCH] Remove now uneeded Chat/utils.js --- src/qml/Chat/utils.js | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/qml/Chat/utils.js diff --git a/src/qml/Chat/utils.js b/src/qml/Chat/utils.js deleted file mode 100644 index 17059c3d..00000000 --- a/src/qml/Chat/utils.js +++ /dev/null @@ -1,41 +0,0 @@ -function getLeftBannerText(leftEvent) { - if (! leftEvent) { - return "You are not member of this room." - } - - var info = leftEvent.content - var prev = leftEvent.prev_content - var reason = info.reason ? (" Reason: " + info.reason) : "" - - if (leftEvent.state_key === leftEvent.sender) { - return (prev && prev.membership === "invite" ? - "You declined to join the room." : "You left the room.") + - reason - } - - if (info.membership) - - var name = Backend.users.get(leftEvent.sender).displayName.value - - return "" + name + " " + - (info.membership == "ban" ? - "banned you from the room." : - - prev && prev.membership === "invite" ? - "canceled your invitation." : - - prev && prev.membership == "ban" ? - "unbanned you from the room." : - - "kicked you out of the room.") + - reason -} - - -function getLeftBannerAvatarName(leftEvent, accountId) { - if (! leftEvent || leftEvent.state_key == leftEvent.sender) { - return Backend.users.get(accountId).displayName.value - } - - return Backend.users.get(leftEvent.sender).displayName.value -}