Skip to content

Thread RCS replies (thread-identifier, replyToGUID) - #40

Open
stealth658 wants to merge 1 commit into
OpenBubbles:masterfrom
stealth658:rcs-reply-threading
Open

stealth658 wants to merge 1 commit into
OpenBubbles:masterfrom
stealth658:rcs-reply-threading

Conversation

@stealth658

Copy link
Copy Markdown

RCS replies arrive unthreaded even though the relay payloads reference the replied-to message.

Received replies: RawSmsIncomingMessage didn't model these keys and the parse hardcoded reply_guid/reply_part to None:

  • thread-identifier: r:<part>:<guid>, the same shape as the iMessage reply ref
  • thread-originator-guid: the bare guid (used as a fallback, part 0)

Replies sent from another of the account's devices (reflected RawSmsOutgoingMessage): the guid is in mD as replyToGUID (capital GUID). The field was renamed replyToGuid, so it never matched. It now accepts both spellings and is also mapped to reply_guid (part 0); after_guid is unchanged.

Relayed replies sent from rustpush now include thread-identifier and thread-originator-guid built from reply_guid/reply_part.

split_reply_thread parses the r:<part>:<guid> shape and returns None on malformed input instead of panicking.

Testing: builds on current master (cargo check). The receive-side keys come from captured payloads on my account (T-Mobile RCS): a reply sent from iOS carried thread-identifier/thread-originator-guid, and its reflected copy carried replyToGUID, all matching the original message's g. I have not run this end to end yet. The send-side part is untested: I don't know yet whether the receiving device threads relayed replies that carry these keys.

Received RCS replies reference the replied-to message, but
RawSmsIncomingMessage did not model those keys and the parse hardcoded
reply_guid/reply_part to None, so replies arrived unthreaded:

- thread-identifier: "r:<part>:<guid>", same shape as the iMessage reply ref
- thread-originator-guid: the bare guid (fallback, part 0)

Replies sent from another of the account's devices are reflected as
RawSmsOutgoingMessage with the guid in mD replyToGUID (capital GUID). The
field was renamed "replyToGuid", so it never matched; accept both
spellings and also map it to reply_guid (part 0). after_guid is unchanged.

Relayed replies sent from rustpush now carry thread-identifier and
thread-originator-guid built from reply_guid/reply_part.

split_reply_thread parses the "r:<part>:<guid>" shape and returns None on
malformed input instead of panicking.
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