Fixed gifted subs display incorrect information

This commit is contained in:
nuttylmao
2025-07-14 08:19:08 +10:00
parent 2df6f7a4c9
commit 6b9ef3f863
+4 -2
View File
@@ -2359,9 +2359,11 @@ async function KickGiftedSubscriptions(data) {
// Set the text // Set the text
const gifter = data.gifter_username; const gifter = data.gifter_username;
const gifts = data.gifter_total; const gifts = data.gifter_total;
titleDiv.innerText = `${gifter} gifted ${gifts} subscription${gifts === 1 ? '' : 's'} to the community!`; const giftedUsers = data.gifted_usernames;
titleDiv.innerText = `${gifter} gifted ${giftedUsers.length} subscription${giftedUsers.length === 1 ? '' : 's'} to the community!`;
contentDiv.innerText = `${gifts === 1 ? '' : "They've gifted " + gifts + " subscription in the channel."}`;
if (gifts > 1) if (giftedUsers.length > 1)
AddMessageItem(instance, data.messageId); AddMessageItem(instance, data.messageId);
// Send individual notifications for every gifted user // Send individual notifications for every gifted user