From fe4625839b40c3002d497160eeaf2204f657dfc9 Mon Sep 17 00:00:00 2001 From: Armored Dragon Date: Tue, 9 Jul 2024 13:23:44 -0500 Subject: [PATCH] Sanity check on message channel. Signed-off-by: Armored Dragon --- scripts/communityScripts/armored-chat/armored_chat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/communityScripts/armored-chat/armored_chat.js b/scripts/communityScripts/armored-chat/armored_chat.js index df8c3fb03f..d74f1203ac 100644 --- a/scripts/communityScripts/armored-chat/armored_chat.js +++ b/scripts/communityScripts/armored-chat/armored_chat.js @@ -96,9 +96,10 @@ if (channel !== "chat") return; message = JSON.parse(message); + if (!message.channel) message.channel = 'domain'; // We don't know where to put this message. Assume it is a domain wide message. + // Floofchat compatibility hook message = floofChatCompatibilityConversion(message); - message.channel = message.channel.toLowerCase(); // Make sure the "local", "domain", etc. is formatted consistently if (!channels.includes(message.channel)) return; // Check the channel