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
parent 752992760b
commit e4439a3f10

View file

@ -62,6 +62,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;
}