mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-18 19:50:58 -04:00
Shared chat now shows usernames
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user