Skip to content

Commit

Permalink
Include r9kbeta -> uniquechat in filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
phroggster committed Dec 31, 2024
1 parent 4eff733 commit a3fdbba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend/events/filters/builtin/twitch/chat-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ const filter: EventFilter = {

const { comparisonType, value } = filterSettings;
const { eventMeta } = eventData;
// Unique chat previously used 'r9kbeta' on PubSub; became 'uniquechat' on EventSub.
const ucValue = value === "r9kbeta" ? "uniquechat" : value;

const chatModes = eventMeta.chatMode as string;

switch (comparisonType) {
case ComparisonType.IS:
return chatModes.includes(value);
return chatModes.includes(ucValue);
case ComparisonType.IS_NOT:
return !chatModes.includes(value);
return !chatModes.includes(ucValue);
default:
return false;
}
Expand Down

0 comments on commit a3fdbba

Please sign in to comment.