From 9d0af7f22a864407ce524c83588c872f29459690 Mon Sep 17 00:00:00 2001 From: Ske Date: Sun, 9 Feb 2020 15:27:52 +0100 Subject: [PATCH] Fix image proxying with empty messages --- PluralKit.Bot/Services/ProxyService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Services/ProxyService.cs b/PluralKit.Bot/Services/ProxyService.cs index 21a756f0..301e139d 100644 --- a/PluralKit.Bot/Services/ProxyService.cs +++ b/PluralKit.Bot/Services/ProxyService.cs @@ -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;