Prevent private channels from being broadcast to

Fixes #1316
This commit is contained in:
Jordan Brown
2021-09-05 19:51:59 -04:00
parent 58b6e1fb17
commit b885ea3477
@@ -501,7 +501,10 @@ namespace Tgstation.Server.Host.Components.Chat
: $"TGS: Updating to version {updateVersion}...";
List<ulong> wdChannels;
lock (mappedChannels) // so it doesn't change while we're using it
wdChannels = mappedChannels.Select(x => x.Key).ToList();
wdChannels = mappedChannels
.Where(x => !x.Value.Channel.IsPrivateChannel)
.Select(x => x.Key)
.ToList();
return SendMessage(message, wdChannels, cancellationToken);
}