Skip to content

Commit 3aecb08

Browse files
committed
viewer count fix
1 parent 9ca0aec commit 3aecb08

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

background.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3579,11 +3579,11 @@ const checkDuplicateSources = new CheckDuplicateSources();
35793579

35803580
async function processIncomingMessage(message, sender=null){
35813581

3582-
try {
3583-
if (sender?.tab){
3584-
message.tid = sender.tab.id; // including the source (tab id) of the social media site the data was pulled from
3585-
}
3586-
} catch (e) {}
3582+
try {
3583+
if (sender?.tab && (message.tid === undefined || message.tid === null)){
3584+
message.tid = sender.tab.id; // including the source (tab id) of the social media site the data was pulled from
3585+
}
3586+
} catch (e) {}
35873587

35883588
if (isExtensionOn && message?.type) {
35893589
if (!checkIfAllowed(message.type)) {

events.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,6 @@ <h1>Stream Events & Donations Dashboard</h1>
15031503

15041504
window.addEventListener("message", function (e) {
15051505
if (e.source != iframe.contentWindow) return;
1506-
log(e.data);
15071506
// Logic to populate iframe.connectedPeers, similar to dock.html
15081507
if ("action" in e.data && e.data.UUID && "value" in e.data) {
15091508
const peerUUID = e.data.UUID;
@@ -1530,6 +1529,7 @@ <h1>Stream Events & Donations Dashboard</h1>
15301529
}
15311530

15321531
if (e.data.dataReceived && e.data.dataReceived.overlayNinja) {
1532+
log(e.data.dataReceived.overlayNinja);
15331533
addMessageToOverlay(e.data.dataReceived.overlayNinja);
15341534
}
15351535
});

0 commit comments

Comments
 (0)