feat(eventsub): implement automod message update (#6010)

This commit is contained in:
nerix
2025-03-01 15:46:41 +01:00
committed by GitHub
parent bced3c658d
commit 17a44e19bb
11 changed files with 1028 additions and 19 deletions
+18
View File
@@ -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);