Skip to content

Commit

Permalink
subscribe is now a MessageEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodytrash committed Aug 30, 2022
1 parent 25752a9 commit 6cd2e5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ const MessageEvents = {
LIVEINTRO: 'liveIntro',
EMOTE: 'emote',
ENVELOPE: 'envelope',
};

const CustomEvents = {
SUBSCRIBE: 'subscribe',
};

Expand Down Expand Up @@ -510,7 +507,7 @@ class WebcastPushConnection extends EventEmitter {
this.emit(MessageEvents.ENVELOPE, simplifiedObj);
break;
case 'WebcastSubNotifyMessage':
this.emit(CustomEvents.SUBSCRIBE, simplifiedObj);
this.emit(MessageEvents.SUBSCRIBE, simplifiedObj);
break;
}
});
Expand Down
4 changes: 4 additions & 0 deletions src/lib/tiktokUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ function getUuc() {
return uu.length;
}

setInterval(() => {
uu = [];
}, 1000 * 60 * 30);

module.exports = {
getRoomIdFromMainPageHtml,
validateAndNormalizeUniqueId,
Expand Down

0 comments on commit 6cd2e5e

Please sign in to comment.