fix(bot): make proxy/log blacklists work properly with threads
Handling of both blacklists was inconsistent when dealing with threads: - proxy blacklist of root channel blacklists all threads - log blacklist of root channel _did not apply_ to threads - couldn't proxy blacklist threads while leaving root channel proxyable This change fixes the inconsistencies: - proxy _and_ log blacklist of root channel affects all threads - now able to individually proxy/log blacklist threads, with root channel unaffected
This commit is contained in:
@@ -63,11 +63,12 @@ public class LogChannelService
|
||||
return null;
|
||||
|
||||
var guildId = proxiedMessage.Guild ?? trigger.GuildId.Value;
|
||||
var rootChannel = await _cache.GetRootChannel(trigger.ChannelId);
|
||||
|
||||
// get log channel info from the database
|
||||
var guild = await _repo.GetGuild(guildId);
|
||||
var logChannelId = guild.LogChannel;
|
||||
var isBlacklisted = guild.LogBlacklist.Any(x => x == trigger.ChannelId);
|
||||
var isBlacklisted = guild.LogBlacklist.Any(x => x == trigger.ChannelId || x == rootChannel.Id);
|
||||
|
||||
// if (ctx.SystemId == null ||
|
||||
// removed the above, there shouldn't be a way to get to this code path if you don't have a system registered
|
||||
|
Reference in New Issue
Block a user