From 3fca071c1d3c79da2bbf6c905f27255621f21466 Mon Sep 17 00:00:00 2001 From: Ske Date: Thu, 8 Nov 2018 15:47:21 +0100 Subject: [PATCH] Count all-blank strings as empty for the purposes of proxy validation --- src/pluralkit/bot/proxy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pluralkit/bot/proxy.py b/src/pluralkit/bot/proxy.py index a025f99d..078f250f 100644 --- a/src/pluralkit/bot/proxy.py +++ b/src/pluralkit/bot/proxy.py @@ -164,7 +164,8 @@ async def try_proxy_message(conn, message: discord.Message, logger: ChannelLogge inner_text = utils.sanitize(inner_text) # If we don't have an inner text OR an attachment, we cancel because the hook can't send that - if not inner_text and not message.attachments: + # Strip so it counts a string of solely spaces as blank too + if not inner_text.strip() and not message.attachments: return False # So, we now have enough information to successfully proxy a message