Implement basic and stupid ignore functionality

We currently do not respect mod status
This commit is contained in:
Rasmus Karlsson 2018-05-12 23:27:34 +02:00 committed by fourtf
parent 88e97325f8
commit 61dac49f6d

View file

@ -76,6 +76,17 @@ bool TwitchMessageBuilder::isIgnored() const
}
}
if (this->tags.contains("user-id")) {
auto sourceUserID = this->tags.value("user-id").toString();
for (const auto &user : app->accounts->Twitch.getCurrent()->getIgnores()) {
if (sourceUserID == user.id) {
debug::Log("Blocking message because it's from blocked user {}", user.name);
return true;
}
}
}
return false;
}