From 7137c8f2433a50b26581ac319ef83dfed1b649c6 Mon Sep 17 00:00:00 2001 From: nuttylmao Date: Mon, 1 Sep 2025 08:09:42 +1000 Subject: [PATCH] Shared chat now shows usernames --- multichat-overlay/script.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/multichat-overlay/script.js b/multichat-overlay/script.js index 68f0281..5b971b0 100644 --- a/multichat-overlay/script.js +++ b/multichat-overlay/script.js @@ -521,24 +521,14 @@ async function TwitchChatMessage(data) { // Set Shared Chat 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; - + if (isFromSharedChatGuest) { 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'; + let sharedChatChannel = data.sharedChatSource.name; // Twitch removed the source channel for some reason?!?! + if (sharedChatChannel.toLowerCase() != data.sharedChatSource.login.toLowerCase()) + sharedChatChannel = `${sharedChatChannel} (${data.sharedChatSource.login})`; sharedChatDiv.style.display = 'block'; sharedChatChannelDiv.innerHTML = `💬 ${sharedChatChannel}`; messageContainerDiv.classList.add("highlightMessage");