fix: safe_send empty-fallback no longer re-injects whitespace-only content

When chunk_text dropped a whitespace-only content to [] and there were no embeds, the
empty-messages fallback re-sent the raw original content - the exact whitespace 444e08b
set out to eliminate, which Discord 50006s. The fallback now sends content=None so a
files/view-only call still goes out as one message, and whitespace-only content is never
forwarded raw; a genuinely empty send remains the caller's fail-loud error.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-07-06 19:29:55 -04:00
parent 444e08b7db
commit 65fa11316e
+4 -1
View File
@@ -72,7 +72,10 @@ async def safe_send(
first = False first = False
if not messages: if not messages:
messages.append(await _send(destination, content, None, True, per_chunk, once_only)) # nothing chunked out (no content, or whitespace-only that chunk_text dropped) and no
# embeds: send content=None so a files/view-only call still goes out as one message,
# WITHOUT re-injecting the raw whitespace chunk_text discarded (which Discord 50006s)
messages.append(await _send(destination, None, None, True, per_chunk, once_only))
return messages return messages