mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-13 12:50:37 -05:00
Validate that user id matches token
This commit is contained in:
@@ -1096,6 +1096,12 @@ void MacroConditionTwitch::AddChannelGenericEventSubscription(
|
||||
return;
|
||||
}
|
||||
|
||||
const auto id = token->GetUserID();
|
||||
if (!id) {
|
||||
vblog(LOG_INFO, "%s skip - invalid user id", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
const auto channelID = _channel.GetUserID(*token);
|
||||
if (!TwitchChannel::IsValid(channelID)) {
|
||||
vblog(LOG_INFO, "skip %s because of invalid channel selection",
|
||||
@@ -1114,7 +1120,7 @@ void MacroConditionTwitch::AddChannelGenericEventSubscription(
|
||||
|
||||
if (includeModeratorId) {
|
||||
obs_data_set_string(condition, "moderator_user_id",
|
||||
token->GetUserID().c_str());
|
||||
id->c_str());
|
||||
}
|
||||
|
||||
obs_data_apply(condition, extraConditions);
|
||||
|
||||
Reference in New Issue
Block a user