feat(eventsub): implement automod message update (#6010)
This commit is contained in:
@@ -1522,6 +1522,22 @@ void TwitchChannel::refreshPubSub()
|
||||
},
|
||||
},
|
||||
});
|
||||
this->eventSubAutomodMessageUpdateHandle =
|
||||
getApp()->getEventSub()->subscribe(eventsub::SubscriptionRequest{
|
||||
.subscriptionType = "automod.message.update",
|
||||
.subscriptionVersion = "2",
|
||||
.conditions =
|
||||
{
|
||||
{
|
||||
"broadcaster_user_id",
|
||||
roomId,
|
||||
},
|
||||
{
|
||||
"moderator_user_id",
|
||||
currentAccount->getUserId(),
|
||||
},
|
||||
},
|
||||
});
|
||||
this->eventSubSuspiciousUserMessageHandle =
|
||||
getApp()->getEventSub()->subscribe(eventsub::SubscriptionRequest{
|
||||
.subscriptionType = "channel.suspicious_user.message",
|
||||
@@ -1542,6 +1558,8 @@ void TwitchChannel::refreshPubSub()
|
||||
else
|
||||
{
|
||||
this->eventSubChannelModerateHandle.reset();
|
||||
this->eventSubAutomodMessageHoldHandle.reset();
|
||||
this->eventSubAutomodMessageUpdateHandle.reset();
|
||||
this->eventSubSuspiciousUserMessageHandle.reset();
|
||||
}
|
||||
getApp()->getTwitchPubSub()->listenToChannelPointRewards(roomId);
|
||||
|
||||
Reference in New Issue
Block a user