From 9964d91729b1c63d5c1ab857b2f5c76e162f3ff5 Mon Sep 17 00:00:00 2001 From: Armored Dragon Date: Thu, 11 Jul 2024 14:21:32 -0500 Subject: [PATCH] Fixed message subscription. Signed-off-by: Armored Dragon --- scripts/communityScripts/armored-chat/armored_chat.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/communityScripts/armored-chat/armored_chat.js b/scripts/communityScripts/armored-chat/armored_chat.js index d74f1203ac..fe66da7a54 100644 --- a/scripts/communityScripts/armored-chat/armored_chat.js +++ b/scripts/communityScripts/armored-chat/armored_chat.js @@ -8,7 +8,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html (() => { - "use strict"; + ("use strict"); var appIsVisible = false; var settings = { @@ -27,6 +27,7 @@ var palData = AvatarManager.getPalData().data; Controller.keyPressEvent.connect(keyPressEvent); + Messages.subscribe("Chat"); // Floofchat Messages.subscribe("chat"); Messages.messageReceived.connect(receivedMessage); AvatarManager.avatarAddedEvent.connect((sessionId) => { @@ -96,7 +97,8 @@ 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. + if (!message.channel) message.channel = "domain"; // We don't know where to put this message. Assume it is a domain wide message. + if (message.forApp) return; // Floofchat // Floofchat compatibility hook message = floofChatCompatibilityConversion(message);