From 60c4071378cf93deacab98aa6d5179373a42e3d1 Mon Sep 17 00:00:00 2001 From: nuttylmao Date: Thu, 28 Aug 2025 09:08:23 +1000 Subject: [PATCH] Fixed Shared Chat --- multichat-overlay/script.js | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/multichat-overlay/script.js b/multichat-overlay/script.js index 1c3cf63..34b7045 100644 --- a/multichat-overlay/script.js +++ b/multichat-overlay/script.js @@ -520,18 +520,36 @@ async function TwitchChatMessage(data) { } // Set Shared Chat - const isSharedChat = data.isSharedChat; - if (isSharedChat) { - if (showTwitchSharedChat > 1) { - if (!data.sharedChat.primarySource) { - const sharedChatChannel = data.sharedChat.sourceRoom.name; + const isFromSharedChatGuest = data.isFromSharedChatGuest; + if (isFromSharedChatGuest) { + // if (showTwitchSharedChat > 1) { + // if (!data.sharedChat.primarySource) { + // const sharedChatChannel = data.sharedChat.sourceRoom.name; + // sharedChatDiv.style.display = 'block'; + // sharedChatChannelDiv.innerHTML = `💬 ${sharedChatChannel}`; + // messageContainerDiv.classList.add("highlightMessage"); + // } + // } + // else if (!data.sharedChat.primarySource && showTwitchSharedChat == 0) + // return; + + switch (showTwitchSharedChat) + { + // 2 = Show & Highlight + case 2: + // const sharedChatChannel = data.sharedChat.sourceRoom.name; // Twitch removed the source channel for some reason?!?! + const sharedChatChannel = 'Shared Chat'; sharedChatDiv.style.display = 'block'; sharedChatChannelDiv.innerHTML = `💬 ${sharedChatChannel}`; messageContainerDiv.classList.add("highlightMessage"); - } + break; + // 1 = Show but do not highlight + case 1: + break; + // 0 = Do not show + case 0: + return; } - else if (!data.sharedChat.primarySource && showTwitchSharedChat == 0) - return; } // Set Reply Message