Fix image proxying with empty messages

This commit is contained in:
Ske 2020-02-09 15:27:52 +01:00
parent f2bbf8a51d
commit 9d0af7f22a

View File

@ -97,7 +97,8 @@ namespace PluralKit.Bot
// If we didn't get a match by proxy tags, try to get one by autoproxy
// Also try if we *did* get a match, but there's no inner text. This happens if someone sends a message that
// is equal to someone else's tags, and messages like these should be autoproxied if possible
if (match == null || match.InnerText.Trim().Length == 0) match = await GetAutoproxyMatch(account, systemSettingsForGuild, message, channel);
if (match == null || (match.InnerText.Trim().Length == 0 && message.Attachments.Count == 0))
match = await GetAutoproxyMatch(account, systemSettingsForGuild, message, channel);
// If we still haven't found any, just yeet
if (match == null) return;