Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix stuff #2047

Merged
merged 1 commit into from
Jul 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/TextForEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,14 @@ function textForServerACLEvent(ev) {
text = `${senderDisplayName} changed the server ACLs for this room: `;
}

if (!Array.isArray(current.allow)) {
current.allow = [];
}
/* 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 = [];
}

if (!Array.isArray(current.deny)) {
current.deny = [];
}
Expand Down