Send into a thread - #23
Merged
Merged
Conversation
mx_send_text() gains a thread parameter: given a root event id it attaches m.relates_to with rel_type m.thread, alongside the reply fallback (is_falling_back plus m.in_reply_to pointing at the root) so a client that does not implement threads renders the message as a reply rather than as loose chatter in the room. The inbound half already existed -- mx_extract_text_events() has carried relates_to since 0.2.0.4 -- so this closes the round trip.
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.
mx_send_text() gains a
threadparameter. Given a root event id it attaches m.relates_to with rel_type m.thread, plus the reply fallback the spec asks for (is_falling_back and an m.in_reply_to pointing at the root) so a client that does not implement threads renders the message as a reply to the root rather than as loose chatter in the room.The inbound half already exists — mx_extract_text_events() has carried
relates_tosince 0.2.0.4 — so this closes the round trip. First of three PRs wiring threaded replies up the stack (mx.client → chat.api → corteza), so a reply to an archived conversation's thread can be routed back into that thread.An empty or NULL thread id means no relation at all, rather than one pointing nowhere, and a thread composes with markdown and mentions rather than replacing them; both are pinned by tests.
Note: the local media-extractor branch also carries a 0.2.0.5 bump, so whichever merges second rebases its bump.