diff options
| author | Kenneth Lien <kenneth@anthropic.com> | 2026-03-26 23:11:49 -0700 |
|---|---|---|
| committer | Kenneth Lien <kenneth@anthropic.com> | 2026-03-26 23:11:49 -0700 |
| commit | c29338f2762a2c6e531c2bb781841319a538ed63 (patch) | |
| tree | 920446211e03c16f857b946b0eea27d2c68b07c6 /external_plugins | |
| parent | 03a685d5f612f890dbe63446dae2f762a3e7e65e (diff) | |
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
Diffstat (limited to 'external_plugins')
| -rw-r--r-- | external_plugins/imessage/server.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/external_plugins/imessage/server.ts b/external_plugins/imessage/server.ts index d94889c5..5421f3a3 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. |
