1
0
mirror of https://github.com/oliverbooth/VPLink synced 2024-11-09 23:45:40 +00:00

Merge branch 'hotfix/ignore_nonrelay' into main

This commit is contained in:
Oliver Booth 2023-08-26 16:40:44 +01:00
commit 0deb14e137
Signed by: oliverbooth
GPG Key ID: B89D139977693FED

View File

@ -102,6 +102,9 @@ internal sealed partial class DiscordMessageService : BackgroundService, IDiscor
if (author.IsBot && !_configurationService.BotConfiguration.RelayBotMessages) if (author.IsBot && !_configurationService.BotConfiguration.RelayBotMessages)
return Task.CompletedTask; return Task.CompletedTask;
if (message.Channel.Id != _configurationService.DiscordConfiguration.ChannelId)
return Task.CompletedTask;
string displayName = author.GlobalName ?? author.Username; string displayName = author.GlobalName ?? author.Username;
string unescaped = UnescapeRegex.Replace(message.Content, "$1"); string unescaped = UnescapeRegex.Replace(message.Content, "$1");
string content = EscapeRegex.Replace(unescaped, "\\$1"); string content = EscapeRegex.Replace(unescaped, "\\$1");