From ff200e39938eb76cd112955bcf9e1017addbf168 Mon Sep 17 00:00:00 2001 From: VAC Date: Tue, 6 Jan 2026 17:37:16 -0500 Subject: [PATCH] fix(discord): handle voice messages with empty content Discord voice messages have empty `content` with the audio in attachments. The nullish coalescing operator (`??`) doesn't fall through on empty strings, so voice messages were being dropped as 'empty content'. Changed to logical OR (`||`) so empty string falls through to media placeholder. --- src/discord/monitor.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/discord/monitor.ts b/src/discord/monitor.ts index b4800c23a..6b088fb3f 100644 --- a/src/discord/monitor.ts +++ b/src/discord/monitor.ts @@ -662,9 +662,9 @@ export function createDiscordMessageHandler(params: { const media = await resolveMedia(message, mediaMaxBytes); const text = - message.content?.trim() ?? - media?.placeholder ?? - message.embeds?.[0]?.description ?? + message.content?.trim() || + media?.placeholder || + message.embeds?.[0]?.description || ""; if (!text) { logVerbose(`discord: drop message ${message.id} (empty content)`);