Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tmi): set correct if condition #2931

Merged
merged 2 commits into from
Oct 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bot/tmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ class TMI extends Core {

const sender = data.message.tags;
const message = data.message.message;
const skip = data.skip;
const skip = data.skip ?? false;
const quiet = data.quiet;

if (!sender.userId && sender.username) {
Expand All @@ -735,7 +735,7 @@ class TMI extends Core {

const isModerated = await parse.isModerated();
if (!isModerated && !isIgnored(sender)) {
if (!skip && isNil(sender.username)) {
if (!skip && !isNil(sender.username)) {
const subCumulativeMonths = function(senderObj) {
if (typeof senderObj.badgeInfo === 'string' && senderObj.badgeInfo.includes('subscriber')) {
const match = senderObj.badgeInfo.match(/subscriber\/(\d+)/);
Expand Down