Automod info (#2744)

Co-authored-by: Sidd <iProdigy@users.noreply.github.com>
This commit is contained in:
apa420
2021-05-08 14:49:30 +02:00
committed by GitHub
parent c40bdf812b
commit bb73069817
7 changed files with 98 additions and 1 deletions
+17 -1
View File
@@ -314,7 +314,7 @@ void Application::initPubsub()
}
postToThread([chan, action] {
auto p = makeAutomodMessage(action);
const auto p = makeAutomodMessage(action);
chan->addMessage(p.first);
chan->addMessage(p.second);
});
@@ -338,6 +338,22 @@ void Application::initPubsub()
chan->deleteMessage(msg->id);
});
this->twitch.pubsub->signals_.moderation.automodInfoMessage.connect(
[&](const auto &action) {
auto chan =
this->twitch.server->getChannelOrEmptyByID(action.roomID);
if (chan->isEmpty())
{
return;
}
postToThread([chan, action] {
const auto p = makeAutomodInfoMessage(action);
chan->addMessage(p);
});
});
this->twitch.pubsub->signals_.pointReward.redeemed.connect([&](auto &data) {
QString channelId;
if (rj::getSafe(data, "channel_id", channelId))