matrix-org / matrix-org/matrix-spec
[idea] Message-subset mention/reply
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
Alternate names;
- Bot-generated bookmarks
- Quotations/references
- Linked data (in JSON)
---
[Chatting with Glue](https://a9.io/glue-comic/) has a lot of interesting (but sporadic and all-over-the-place) ideas, but one thing I want to focus on is [chapter 4](https://a9.io/glue-comic/page-4), which introduces the idea of "replying to specific parts of a message";


This may be interesting for social reasons, however, the specific thing that sparked me writing down this idea is the amount of current bots that watch out for and react with a message when they see a particular mention of something. Specifically, github bots, most often [go-neb](https://github.com/matrix-org/go-neb) which reacts to messages which mention issue/PR numbers (`#1234`, `example/company#4321`) with a link to the actual issue/PR.
However, in the following case, with the compounding lag and lack of context, it can get verbose;

For this, i'd like to give the idea of linking to specific subsets of the message, this'd be a `m.relationship` to an event_id, but then also a selector (something like `.content.formatted_msg[326..387]`) which selects a particular bit of data.
Then the event ID can be much of anything, as mentioned; bookmark, quotation (from in another message), or some form of linked-data format, referencing to a specific field in another event. This'd make those references more machine readable, and easier to generate for bots, which'd then just pick the range that they'd like to add a bookmark to, and clients can decide to render these or not (most likely depending on another state in the room that'd "allow" this).
#### Security
Obviously, someone inserting a link that then (presumably) pops up in the user's original text is a security risk, and so such a privilege should be restricted to a few bots or persons.
However, such a function can also be merely social (such as clarifying a particular bit of info for old readers, by linking to a particular bit of info. This'd also have to happen on an admin or case-by-case basis then.
#### More usages/inspiration
Discourse offers the option to quote/reply/reference multiple sections in multiple messages in a thread, like so;

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files, tests, or entry points are named. Start by reviewing the proposed m.relationship and selector model, including the security and rendering concerns described in the issue; this needs a settled protocol design and acceptance criteria before implementation can be considered done.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100