Repository navigation
fix: notification id, SMS ids and thread requests, pair reject; correct IPC docs - #52
Merged
bethropolis merged 4 commits intoOct 5, 2026
Merged
Conversation
notification events had no id although the docs show one, so clients could not call notify_dismiss or match notification.canceled (which does carry the id) to the notification it cancels. AI assisted
…tted
- Android sends the message id as "_id" (Telephony.Sms._ID), so
sms.incoming always carried u_id 0 and clients could not de-duplicate.
- sms_request_conversation decoded omitted rangeStartTimestamp and
numberToRequest to 0 and forwarded them, asking the phone for zero
messages older than the epoch; the documented minimal request
{deviceId, threadID} returned nothing (also hit by kcd sms conversation).
Omitted fields are now left out, which Android treats as the whole thread.
AI assisted
handlePair ignored the documented accept/reject flags. For a device in
PAIR_REQUESTED_BY_PEER, {"reject": true} took the accept path and
paired the device the user meant to decline. Treat reject as unpair.
AI assisted
share takes filePath, pair accepts unless reject is set, and omitted SMS range fields return the whole thread. AI assisted
bethropolis
added a commit
that referenced
this pull request
Oct 11, 2026
The #52 range fix (omitted fields stay out of the packet) was reachable only over raw IPC: the CLI sent no range fields at all. This exposes them as flags mapping 1:1 to rangeStartTimestamp/numberToRequest. Unset stays unset. IsSet, not a zero default, decides whether a field goes in the packet, because the phone reads an explicit 0 as "older than the epoch" or "zero messages" and returns nothing. Negatives are rejected: neither a ms epoch nor a count can be negative. SmsRequestConversation keeps its signature and delegates with nils, so the public client API does not break; the range form is additive. Live note: verified the default path end to end (126 messages, whole thread) and the payload shapes by test. The capped path could not be confirmed live: the phone stopped answering SMS requests mid-session (its SMS plugin has since been disabled device-side, which is also the documented way to end the latch). Retest with the app awake and unrestricted if the cap's phone-side handling is ever in doubt.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notification id missing.
notificationevents had noid, so clients couldn't dismiss a notification or match it tonotification.canceled. Events now include it.SMS message id always 0. Android sends the message id as
_id, but kcd readu_id, so everysms.incominghadu_id: 0. kcd now reads_id.SMS thread request returns nothing. Omitted
rangeStartTimestamp/numberToRequestwere decoded as0and sent to the phone, which then returns zero messages. This also brokekcd sms conversation. Omitted fields are now left out, so the phone returns the whole thread.Pair reject accepts.
pairignoredreject: for a pending incoming request,{"reject": true}paired the device. Reject now declines (same asunpair).Docs.
sharetakesfilePath, notfile; the pair and SMS range descriptions are corrected.Each fix has a test that fails on
main. Checked live on 1.22.1: a thread request without a range returned nothing, and every message hadu_id: 0.AI assisted