mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): Case insensitive proxy tags matching (#490)
This commit is contained in:
parent
09ac002d26
commit
4f0236d766
14 changed files with 89 additions and 19 deletions
|
|
@ -78,7 +78,7 @@ public class ProxyService
|
|||
members = (await _repo.GetProxyMembers(message.Author.Id, message.GuildId!.Value)).ToList();
|
||||
|
||||
if (!_matcher.TryMatch(ctx, autoproxySettings, members, out var match, message.Content, message.Attachments.Length > 0,
|
||||
allowAutoproxy)) return false;
|
||||
allowAutoproxy, ctx.CaseSensitiveProxyTags)) return false;
|
||||
|
||||
// this is hopefully temporary, so not putting it into a separate method
|
||||
if (message.Content != null && message.Content.Length > 2000)
|
||||
|
|
@ -208,8 +208,9 @@ public class ProxyService
|
|||
"Proxying was disabled in this channel by a server administrator (via the proxy blacklist).");
|
||||
|
||||
var autoproxySettings = await _repo.GetAutoproxySettings(ctx.SystemId.Value, msg.Guild!.Value, null);
|
||||
var config = await _repo.GetSystemConfig(ctx.SystemId.Value);
|
||||
var prevMatched = _matcher.TryMatch(ctx, autoproxySettings, members, out var prevMatch, originalMsg.Content,
|
||||
originalMsg.Attachments.Length > 0, false);
|
||||
originalMsg.Attachments.Length > 0, false, ctx.CaseSensitiveProxyTags);
|
||||
|
||||
var match = new ProxyMatch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue