feat(eventsub): implement suspicious user message (#6007)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"input": {
|
||||
"ban_evasion_evaluation": "unknown",
|
||||
"broadcaster_user_id": "11148817",
|
||||
"broadcaster_user_login": "pajlada",
|
||||
"broadcaster_user_name": "pajlada",
|
||||
"low_trust_status": "monitored",
|
||||
"message": {
|
||||
"fragments": [
|
||||
{
|
||||
"cheermote": null,
|
||||
"emote": null,
|
||||
"text": "FeelsDankMan",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"message_id": "4715b69c-a147-4ff8-bbb5-7c830544d809",
|
||||
"text": "FeelsDankMan"
|
||||
},
|
||||
"shared_ban_channel_ids": null,
|
||||
"types": [
|
||||
"manually_added"
|
||||
],
|
||||
"user_id": "129546453",
|
||||
"user_login": "nerixyz",
|
||||
"user_name": "nerixyz"
|
||||
},
|
||||
"output": [
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"input": {
|
||||
"ban_evasion_evaluation": "unknown",
|
||||
"broadcaster_user_id": "11148817",
|
||||
"broadcaster_user_login": "pajlada",
|
||||
"broadcaster_user_name": "pajlada",
|
||||
"low_trust_status": "none",
|
||||
"message": {
|
||||
"fragments": [
|
||||
{
|
||||
"cheermote": null,
|
||||
"emote": null,
|
||||
"text": "FeelsDankMan",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"message_id": "4715b69c-a147-4ff8-bbb5-7c830544d809",
|
||||
"text": "FeelsDankMan"
|
||||
},
|
||||
"shared_ban_channel_ids": null,
|
||||
"types": [
|
||||
"manually_added"
|
||||
],
|
||||
"user_id": "129546453",
|
||||
"user_login": "nerixyz",
|
||||
"user_name": "nerixyz"
|
||||
},
|
||||
"output": [
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"input": {
|
||||
"ban_evasion_evaluation": "unknown",
|
||||
"broadcaster_user_id": "11148817",
|
||||
"broadcaster_user_login": "pajlada",
|
||||
"broadcaster_user_name": "pajlada",
|
||||
"low_trust_status": "restricted",
|
||||
"message": {
|
||||
"fragments": [
|
||||
{
|
||||
"cheermote": null,
|
||||
"emote": {
|
||||
"emote_set_id": "0",
|
||||
"id": "25"
|
||||
},
|
||||
"text": "Kappa",
|
||||
"type": "emote"
|
||||
}
|
||||
],
|
||||
"message_id": "c7acaf8b-6694-4181-be68-5d79464b0001",
|
||||
"text": "Kappa"
|
||||
},
|
||||
"shared_ban_channel_ids": null,
|
||||
"types": [
|
||||
"manually_added"
|
||||
],
|
||||
"user_id": "129546453",
|
||||
"user_login": "nerixyz",
|
||||
"user_name": "nerixyz"
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"badgeInfos": {
|
||||
},
|
||||
"badges": [
|
||||
],
|
||||
"channelName": "pajlada",
|
||||
"count": 1,
|
||||
"displayName": "",
|
||||
"elements": [
|
||||
{
|
||||
"emote": {
|
||||
"homePage": "https://dashboard.twitch.tv/settings/moderation/automod",
|
||||
"images": {
|
||||
"1x": ""
|
||||
},
|
||||
"name": "",
|
||||
"tooltip": "AutoMod"
|
||||
},
|
||||
"flags": "BadgeChannelAuthority",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"tooltip": "AutoMod",
|
||||
"trailingSpace": true,
|
||||
"type": "BadgeElement"
|
||||
},
|
||||
{
|
||||
"color": "#ff0000ff",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMediumBold",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"Suspicious",
|
||||
"User:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"Restricted"
|
||||
]
|
||||
}
|
||||
],
|
||||
"flags": "LowTrustUsers|EventSub",
|
||||
"id": "",
|
||||
"localizedName": "",
|
||||
"loginName": "",
|
||||
"messageText": "Suspicious User: Restricted",
|
||||
"searchText": "Suspicious User: Restricted",
|
||||
"serverReceivedTime": "2024-05-14T12:31:47Z",
|
||||
"timeoutUser": "",
|
||||
"userID": "",
|
||||
"usernameColor": "#ff000000"
|
||||
},
|
||||
{
|
||||
"badgeInfos": {
|
||||
},
|
||||
"badges": [
|
||||
],
|
||||
"channelName": "pajlada",
|
||||
"count": 1,
|
||||
"displayName": "",
|
||||
"elements": [
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "ChannelName",
|
||||
"link": {
|
||||
"type": "JumpToChannel",
|
||||
"value": "pajlada"
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"#pajlada"
|
||||
]
|
||||
},
|
||||
{
|
||||
"element": {
|
||||
"color": "System",
|
||||
"flags": "Timestamp",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"12:31"
|
||||
]
|
||||
},
|
||||
"flags": "Timestamp",
|
||||
"format": "",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"time": "12:31:47",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TimestampElement"
|
||||
},
|
||||
{
|
||||
"flags": "ModeratorTools",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TwitchModerationElement"
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"fallbackColor": "Text",
|
||||
"flags": "Text|Mention",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "MentionElement",
|
||||
"userColor": "Text",
|
||||
"userLoginName": "nerixyz",
|
||||
"words": [
|
||||
"nerixyz:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"Kappa"
|
||||
]
|
||||
}
|
||||
],
|
||||
"flags": "PubSub|LowTrustUsers|RestrictedMessage|EventSub",
|
||||
"id": "",
|
||||
"localizedName": "",
|
||||
"loginName": "nerixyz",
|
||||
"messageText": "nerixyz: Kappa",
|
||||
"searchText": "nerixyz: Kappa",
|
||||
"serverReceivedTime": "2024-05-14T12:31:47Z",
|
||||
"timeoutUser": "",
|
||||
"userID": "",
|
||||
"usernameColor": "#ff000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
{
|
||||
"input": {
|
||||
"ban_evasion_evaluation": "unknown",
|
||||
"broadcaster_user_id": "11148817",
|
||||
"broadcaster_user_login": "pajlada",
|
||||
"broadcaster_user_name": "pajlada",
|
||||
"low_trust_status": "restricted",
|
||||
"message": {
|
||||
"fragments": [
|
||||
{
|
||||
"cheermote": null,
|
||||
"emote": null,
|
||||
"text": "FeelsDankMan",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"message_id": "4715b69c-a147-4ff8-bbb5-7c830544d809",
|
||||
"text": "FeelsDankMan"
|
||||
},
|
||||
"shared_ban_channel_ids": null,
|
||||
"types": [
|
||||
"manually_added"
|
||||
],
|
||||
"user_id": "129546453",
|
||||
"user_login": "nerixyz",
|
||||
"user_name": "nerixyz"
|
||||
},
|
||||
"output": [
|
||||
{
|
||||
"badgeInfos": {
|
||||
},
|
||||
"badges": [
|
||||
],
|
||||
"channelName": "pajlada",
|
||||
"count": 1,
|
||||
"displayName": "",
|
||||
"elements": [
|
||||
{
|
||||
"emote": {
|
||||
"homePage": "https://dashboard.twitch.tv/settings/moderation/automod",
|
||||
"images": {
|
||||
"1x": ""
|
||||
},
|
||||
"name": "",
|
||||
"tooltip": "AutoMod"
|
||||
},
|
||||
"flags": "BadgeChannelAuthority",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"tooltip": "AutoMod",
|
||||
"trailingSpace": true,
|
||||
"type": "BadgeElement"
|
||||
},
|
||||
{
|
||||
"color": "#ff0000ff",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMediumBold",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"Suspicious",
|
||||
"User:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"Restricted"
|
||||
]
|
||||
}
|
||||
],
|
||||
"flags": "LowTrustUsers|EventSub",
|
||||
"id": "",
|
||||
"localizedName": "",
|
||||
"loginName": "",
|
||||
"messageText": "Suspicious User: Restricted",
|
||||
"searchText": "Suspicious User: Restricted",
|
||||
"serverReceivedTime": "2024-05-14T12:31:47Z",
|
||||
"timeoutUser": "",
|
||||
"userID": "",
|
||||
"usernameColor": "#ff000000"
|
||||
},
|
||||
{
|
||||
"badgeInfos": {
|
||||
},
|
||||
"badges": [
|
||||
],
|
||||
"channelName": "pajlada",
|
||||
"count": 1,
|
||||
"displayName": "",
|
||||
"elements": [
|
||||
{
|
||||
"color": "System",
|
||||
"flags": "ChannelName",
|
||||
"link": {
|
||||
"type": "JumpToChannel",
|
||||
"value": "pajlada"
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"#pajlada"
|
||||
]
|
||||
},
|
||||
{
|
||||
"element": {
|
||||
"color": "System",
|
||||
"flags": "Timestamp",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"12:31"
|
||||
]
|
||||
},
|
||||
"flags": "Timestamp",
|
||||
"format": "",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"time": "12:31:47",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TimestampElement"
|
||||
},
|
||||
{
|
||||
"flags": "ModeratorTools",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TwitchModerationElement"
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"fallbackColor": "Text",
|
||||
"flags": "Text|Mention",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "MentionElement",
|
||||
"userColor": "Text",
|
||||
"userLoginName": "nerixyz",
|
||||
"words": [
|
||||
"nerixyz:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"color": "Text",
|
||||
"flags": "Text",
|
||||
"link": {
|
||||
"type": "None",
|
||||
"value": ""
|
||||
},
|
||||
"style": "ChatMedium",
|
||||
"tooltip": "",
|
||||
"trailingSpace": true,
|
||||
"type": "TextElement",
|
||||
"words": [
|
||||
"FeelsDankMan"
|
||||
]
|
||||
}
|
||||
],
|
||||
"flags": "PubSub|LowTrustUsers|RestrictedMessage|EventSub",
|
||||
"id": "",
|
||||
"localizedName": "",
|
||||
"loginName": "nerixyz",
|
||||
"messageText": "nerixyz: FeelsDankMan",
|
||||
"searchText": "nerixyz: FeelsDankMan",
|
||||
"serverReceivedTime": "2024-05-14T12:31:47Z",
|
||||
"timeoutUser": "",
|
||||
"userID": "",
|
||||
"usernameColor": "#ff000000"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -82,6 +82,25 @@ const std::map<QString, std::string_view, QCompareCaseInsensitive>
|
||||
"cost": 0
|
||||
})",
|
||||
},
|
||||
{
|
||||
"channel-suspicious-user-message",
|
||||
R"({
|
||||
"id": "a3122e32-6498-4847-8675-109b9b94f29c",
|
||||
"status": "enabled",
|
||||
"type": "channel.suspicious_user.message",
|
||||
"version": "1",
|
||||
"condition": {
|
||||
"broadcaster_user_id": "489584266",
|
||||
"moderator_user_id": "489584266"
|
||||
},
|
||||
"transport": {
|
||||
"method":"websocket",
|
||||
"session_id":"AgoQ59RRLw0mS6S000QtK8f54BIGY2VsbC1j"
|
||||
},
|
||||
"created_at": "2025-02-28T15:55:37.85489173Z",
|
||||
"cost": 0
|
||||
})",
|
||||
},
|
||||
};
|
||||
|
||||
class MockApplication : public mock::BaseApplication
|
||||
|
||||
Reference in New Issue
Block a user