Fixed issue where Mass Gifted subs were showing "0 x Gifted Subs)

This commit is contained in:
nuttylmao
2025-07-29 02:14:49 +10:00
parent 20a0e59c4a
commit 38929ba471
+12
View File
@@ -298,6 +298,17 @@ async function CustomEvent(data) {
break;
case ('KickMassGiftSubscription'):
{
// There is only one sub, so use the same template for a single gifted sub
if ('recipient.userName' in data) {
avatarEl.src = ConvertWEBPToPNG(data["recipient.profilePicture"]);
titleEl.innerText = `Gifted Sub`;
const messageEl = document.createElement('div');
messageEl.innerHTML = `<b>${data["recipient.userName"]}</b><br>received a sub from<br><b>${data.user}</b>!`;
contentEl.appendChild(messageEl);
}
else {
avatarEl.src = ConvertWEBPToPNG(await GetAvatar(data.user, 'kick'));
// Calculate how many subs were gived
@@ -343,6 +354,7 @@ async function CustomEvent(data) {
contentEl.appendChild(messageEl);
}
}
break;
// StreamElements Events