Fix error when proxying all-whitespace message

This commit is contained in:
Ske 2020-07-05 13:26:49 +02:00
parent da7befa1b7
commit bb7ee130a6

View File

@ -35,7 +35,7 @@ namespace PluralKit.Bot
// Edge case: If we got a match with blank inner text, we'd normally just send w/ attachments // Edge case: If we got a match with blank inner text, we'd normally just send w/ attachments
// However, if there are no attachments, the user probably intended something else, so we "un-match" and proceed to autoproxy // However, if there are no attachments, the user probably intended something else, so we "un-match" and proceed to autoproxy
return hasAttachments || match.Content.Length > 0; return hasAttachments || match.Content.Trim().Length > 0;
} }
private bool TryMatchAutoproxy(MessageContext ctx, IReadOnlyCollection<ProxyMember> members, string messageContent, private bool TryMatchAutoproxy(MessageContext ctx, IReadOnlyCollection<ProxyMember> members, string messageContent,