Fixed explicit TTS voices in messages when there is text before the first voice name.

This commit is contained in:
Tom
2025-01-18 22:47:15 +00:00
parent 03d24b0905
commit 6e6f20b097
2 changed files with 11 additions and 2 deletions

View File

@ -70,6 +70,7 @@ namespace TwitchChatTTS.Twitch.Socket.Handlers
}
string permission = GetPermissionPath(message.ChannelPointsCustomRewardId, bits);
_logger.Information(chatterId + " / " + permission + " / groups: " + string.Join(" | ", groups));
if (!HasPermission(chatterId, groups, permission))
{
_logger.Debug($"Blocked message [chatter: {chatterLogin}][message: {message}]");
@ -136,7 +137,7 @@ namespace TwitchChatTTS.Twitch.Socket.Handlers
private bool HasPermission(long chatterId, IEnumerable<string> groups, string permissionPath)
{
return chatterId == _user.OwnerId ? true : _permissionManager.CheckIfAllowed(groups, permissionPath) == true;
return chatterId == _user.OwnerId || _permissionManager.CheckIfAllowed(groups, permissionPath) == true;
}
}
}