From 1ca164f1a9699ebff180e39599fa05cf3b38f6bf Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Fri, 6 Jul 2018 16:36:44 +0100 Subject: [PATCH] Change all ban message and move further up --- src/TextForEvent.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index 6fb9aa0d7b..5d4c14d1b2 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -146,6 +146,11 @@ function textForServerACLEvent(ev) { text = `${senderDisplayName} changed the server ACLs for this room: `; } + /* If we know for sure everyone is banned, don't bother showing the diff view */ + if (current.allow.length === 0) { + return text + "🎉 All servers are banned from participating! This room can no longer be used."; + } + if (!Array.isArray(current.allow)){ current.allow = [] } @@ -182,11 +187,6 @@ function textForServerACLEvent(ev) { changes.push(`Participating from a server using an IP literal hostname is now ${allowban}.`); } - if (current.allow.length === 0) { - changes = ["Everyone is banned! 🎉"]; - } - - return text + changes.join("\n"); } function textForMessageEvent(ev) {