fix: build user timeout/ban message in GUI thread (#3665)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix 2022-04-09 13:58:18 +02:00 committed by GitHub
parent c6db023ee3
commit 0b9f62188c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -269,11 +269,10 @@ void Application::initPubsub()
return;
}
MessageBuilder msg(action);
msg->flags.set(MessageFlag::PubSub);
postToThread([chan, msg = msg.release()] {
chan->addOrReplaceTimeout(msg);
postToThread([chan, action] {
MessageBuilder msg(action);
msg->flags.set(MessageFlag::PubSub);
chan->addOrReplaceTimeout(msg.release());
});
});
this->twitch->pubsub->signals_.moderation.messageDeleted.connect(