From 8882468f3eeb916999978ebdef549f2e079d4a65 Mon Sep 17 00:00:00 2001 From: armored-dragon Date: Sat, 30 Nov 2024 00:32:20 -0600 Subject: [PATCH] Removed floofchat compatibility. --- scripts/system/domainChat/domainChat.js | 36 ------------------------- 1 file changed, 36 deletions(-) diff --git a/scripts/system/domainChat/domainChat.js b/scripts/system/domainChat/domainChat.js index 8d64f35e16..22e28f0f51 100644 --- a/scripts/system/domainChat/domainChat.js +++ b/scripts/system/domainChat/domainChat.js @@ -28,7 +28,6 @@ var palData = AvatarManager.getPalData().data; Controller.keyPressEvent.connect(keyPressEvent); - Messages.subscribe("Chat"); // Floofchat Messages.subscribe("chat"); Messages.messageReceived.connect(receivedMessage); AvatarManager.avatarAddedEvent.connect((sessionId) => { @@ -104,10 +103,7 @@ const timeArray = _formatTimestamp(currentTimestamp); 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); message.channel = message.channel.toLowerCase(); // Check the channel. If the channel is not one we have, do nothing. @@ -216,8 +212,6 @@ action: "send_chat_message", }) ); - - floofChatCompatibilitySendMessage(message, channel); } function _avatarAction(type, sessionId) { Script.setTimeout(() => { @@ -304,34 +298,4 @@ function _emitEvent(packet = { type: "" }) { chatOverlayWindow.sendToQml(packet); } - - // - // Floofchat compatibility functions - // Added to ease the transition between Floofchat to ArmoredChat - // These functions can be safely removed at a much later date. - function floofChatCompatibilityConversion(message) { - if (message.type === "TransmitChatMessage" && !message.forApp) { - return { - position: message.position, - message: message.message, - displayName: message.displayName, - channel: message.channel.toLowerCase(), - }; - } - return message; - } - - function floofChatCompatibilitySendMessage(message, channel) { - Messages.sendMessage( - "Chat", - JSON.stringify({ - position: MyAvatar.position, - message: message, - displayName: MyAvatar.sessionDisplayName, - channel: channel.charAt(0).toUpperCase() + channel.slice(1), - type: "TransmitChatMessage", - forApp: "Floof", - }) - ); - } })();