Fixed Shared Chat

This commit is contained in:
nuttylmao
2025-08-28 09:08:23 +10:00
parent c2729093b4
commit 60c4071378
+26 -8
View File
@@ -520,18 +520,36 @@ async function TwitchChatMessage(data) {
} }
// Set Shared Chat // Set Shared Chat
const isSharedChat = data.isSharedChat; const isFromSharedChatGuest = data.isFromSharedChatGuest;
if (isSharedChat) { if (isFromSharedChatGuest) {
if (showTwitchSharedChat > 1) { // if (showTwitchSharedChat > 1) {
if (!data.sharedChat.primarySource) { // if (!data.sharedChat.primarySource) {
const sharedChatChannel = data.sharedChat.sourceRoom.name; // 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'; sharedChatDiv.style.display = 'block';
sharedChatChannelDiv.innerHTML = `💬 ${sharedChatChannel}`; sharedChatChannelDiv.innerHTML = `💬 ${sharedChatChannel}`;
messageContainerDiv.classList.add("highlightMessage"); 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 // Set Reply Message