From c29338f2762a2c6e531c2bb781841319a538ed63 Mon Sep 17 00:00:00 2001 From: Kenneth Lien Date: Thu, 26 Mar 2026 23:11:49 -0700 Subject: [PATCH] imessage: drop whitespace-only messages from tapbacks/receipts Tapback reactions and read receipts synced from linked devices arrive as chat.db rows with whitespace-only text. The existing empty-check used falsy comparison which doesn't catch ' ' or invisible chars, causing unsolicited replies to reaction taps. Fixes #1041 --- external_plugins/imessage/server.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/external_plugins/imessage/server.ts b/external_plugins/imessage/server.ts index d94889c..5421f3a 100644 --- a/external_plugins/imessage/server.ts +++ b/external_plugins/imessage/server.ts @@ -725,7 +725,10 @@ function handleInbound(r: Row): void { const text = messageText(r) const hasAttachments = r.cache_has_attachments === 1 - if (!text && !hasAttachments) return + // Tapbacks, read receipts, and other sync noise from linked devices land + // as rows with whitespace-only text or bare attachment flags. trim() so + // they don't trigger unsolicited replies. See #1041. + if (!text.trim() && !hasAttachments) return // Never deliver our own sends. In self-chat the is_from_me=1 rows are empty // sent-receipts anyway — the content lands on the is_from_me=0 copy below.