mirror of
https://github.com/lucas-labs/claude-plugins.git
synced 2026-05-11 09:05:43 -03:00
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
This commit is contained in:
parent
03a685d5f6
commit
c29338f276
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user