Revert "feat: remove 2000-character limit for proxied messages"

This reverts commit 7cc2aab1f0.
This commit is contained in:
spiral
2022-01-21 18:23:58 -05:00
parent 31a129dabf
commit ddbf0e8691
3 changed files with 8 additions and 1 deletions

View File

@@ -66,6 +66,10 @@ public class ProxyService
if (!_matcher.TryMatch(ctx, members, out var match, message.Content, message.Attachments.Length > 0,
allowAutoproxy)) return false;
// this is hopefully temporary, so not putting it into a separate method
if (message.Content != null && message.Content.Length > 2000)
throw new PKError("PluralKit cannot proxy messages over 2000 characters in length.");
// Permission check after proxy match so we don't get spammed when not actually proxying
if (!CheckBotPermissionsOrError(botPermissions, rootChannel.Id))
return false;