Skip to content

fix(notifications): MAP messages notify after iOS auto-reads them (tincan-ps152)#61

Merged
quad341 merged 2 commits into
mainfrom
feature/tincan-ps152
Jun 6, 2026
Merged

fix(notifications): MAP messages notify after iOS auto-reads them (tincan-ps152)#61
quad341 merged 2 commits into
mainfrom
feature/tincan-ps152

Conversation

@quad341
Copy link
Copy Markdown
Owner

@quad341 quad341 commented Jun 6, 2026

What this changes

On iOS, when the iPhone fetches a message body over MAP (the GetMessage call), iOS marks
the message as read on the phone immediately. Tincan's _emit_messages set status='read'
to reflect this — but _should_notify in the notification pipeline requires either
status='unread'/'new' or is_new=True to fire a desktop notification. The result was
that only the first message in a conversation ever produced a notification; every
subsequent message was silently dropped.

The fix adds is_new=True to the message dict for every notify=True inbound message
in _emit_messages. The notify flag is already set upstream by filter_new() and the
seen-handles dedup, so is_new=True here is safe: only genuinely new-to-tincan inbound
messages can reach this path. Outbound messages and the initial-poll baseline
(notify=False) cannot receive is_new=True.

Review notes

  • Change is in tincand/backends/bluez_map.py:958 — a single boolean expression replacing
    the previously absent field.
  • No new config knobs, no new endpoints, no breaking changes.
  • Follow-up bead tincan-vlxtb is filed to add a unit test directly on _emit_messages
    for the is_new path (non-blocking for this PR).

Test plan

  • QT_QPA_PLATFORM=offscreen python -m pytest tests/ -q → 1205 passed, 0 failed
  • ruff check tincand/ tincan_gui/ → all checks passed
  • Release gate: release-gates/tincan-ps152-gate.md

Jim Wordelman and others added 2 commits June 6, 2026 09:12
…till notify (tincan-ps152)

iOS MAP auto-marks messages as read when they are fetched (GetMessage).
_emit_messages set status='read' for msg['read']=True, but _should_notify
requires status='unread'/'new' OR is_new=True to fire a notification.
Without is_new the second+ message from any conversation where the phone
already read the message was silently dropped.

Add is_new=True to msg_dict for all notify=True inbound messages.
The notify flag already gates genuinely-new-to-tincan messages via
filter_new()/seen-handles dedup, so is_new=True here is correct.
1204 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@quad341 quad341 merged commit 4a3da09 into main Jun 6, 2026
1 check passed
@quad341 quad341 deleted the feature/tincan-ps152 branch June 6, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant