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:
@@ -2,9 +2,9 @@ namespace PluralKit.Core;
|
||||
|
||||
public partial class ModelRepository
|
||||
{
|
||||
public Task<MessageContext> GetMessageContext(ulong account, ulong guild, ulong channel)
|
||||
public Task<MessageContext> GetMessageContext(ulong account, ulong guild, ulong channel, ulong thread)
|
||||
=> _db.QuerySingleProcedure<MessageContext>("message_context",
|
||||
new { account_id = account, guild_id = guild, channel_id = channel });
|
||||
new { account_id = account, guild_id = guild, channel_id = channel, thread_id = thread });
|
||||
|
||||
public Task<IEnumerable<ProxyMember>> GetProxyMembers(ulong account, ulong guild)
|
||||
=> _db.QueryProcedure<ProxyMember>("proxy_members", new { account_id = account, guild_id = guild });
|
||||
|
Reference in New Issue
Block a user