Implemented AutoMod and write pubsub automod messages TODO: implement that the AutoMod message gets deleted if dealt with \nFixes #887
This commit is contained in:
@@ -251,6 +251,21 @@ void Application::initPubsub()
|
||||
});
|
||||
});
|
||||
|
||||
this->twitch.pubsub->signals_.moderation.automodUserMessage.connect(
|
||||
[&](const auto &action) {
|
||||
auto chan =
|
||||
this->twitch.server->getChannelOrEmptyByID(action.roomID);
|
||||
|
||||
if (chan->isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto msg = MessageBuilder(action).release();
|
||||
|
||||
postToThread([chan, msg] { chan->addMessage(msg); });
|
||||
});
|
||||
|
||||
this->twitch.pubsub->start();
|
||||
|
||||
auto RequestModerationActions = [=]() {
|
||||
|
||||
Reference in New Issue
Block a user