-
Notifications
You must be signed in to change notification settings - Fork 433
MSC3267: Reference relations #3267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b36c24f
initial draft of reference relations msc
bwindels ab551e8
change MSC number
bwindels a5a2c61
Apply formatting
turt2live 62b5b0f
Convert to point at present rather than ideal
turt2live 6eedd7a
Clarify that multiple relations is a thing we don't have and won't fi…
turt2live f37834d
Fix wording to match reality, again
turt2live 2c2d6ae
fix a typo
anoadragon453 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # MSC 3267: reference relationships | ||
|
|
||
| ## Proposal | ||
|
|
||
| This proposal defines a relation type (using [MSC 2674 relations](https://github.com/matrix-org/matrix-doc/pull/2674)) for events to make a reference to another event. | ||
|
|
||
| A `rel_type` of `m.reference` is defined for future handling replies and | ||
| threading. This let you define an event which references an existing | ||
| event. When aggregated, this currently doesn't do anything special, but in | ||
| future could bundle chains of references (i.e. threads). These do not yet | ||
| replace the [reply mechanism currently defined in the spec](https://matrix.org/docs/spec/client_server/latest#rich-replies). | ||
|
|
||
| Reference relations are used by [MSC 2241](https://github.com/matrix-org/matrix-doc/pull/2241) to tie all events together for the same verification request. | ||
|
|
||
| For instance, an `m.room.message` which references an existing event | ||
| would look like: | ||
|
|
||
| ```json | ||
| { | ||
| "type": "m.room.message", | ||
| "content": { | ||
| "body": "i <3 shelties", | ||
| "m.relates_to": { | ||
| "rel_type": "m.reference", | ||
| "event_id": "$another_event_id" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Server aggregation | ||
|
|
||
| Even though [MSC 2674](https://github.com/matrix-org/matrix-doc/pull/2674) states that values for `rel_type` | ||
| should define how the server should aggregate the `rel_type`, this MSC does not define how references should be aggregated by the server on the target event. One possibly way would be to aggregate them as an array of event ids, but the final layout is deferred to [MSC 2675](https://github.com/matrix-org/matrix-doc/pull/2675). The aim of this MSC is to just document the status quo of how `m.reference` is used by [MSC 2241](https://github.com/matrix-org/matrix-doc/pull/2241), where server aggregations are not assumed by the client. | ||
turt2live marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Limitations | ||
|
|
||
| Different subtypes of references could be defined through additional fields on | ||
| the `m.relates_to` object, to distinguish between replies, threads, etc. | ||
| This MSC doesn't attempt to define these subtypes. | ||
|
|
||
| ## Edge Cases | ||
|
|
||
turt2live marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Can you reply (via m.references) to a [reaction](https://github.com/matrix-org/matrix-doc/pull/2677)/[edit](https://github.com/matrix-org/matrix-doc/pull/2677)? | ||
| * Yes, at the protocol level. But you shouldn't expect clients to do anything | ||
| useful with it. | ||
| * Replying to a reaction should be treated like a normal message and have the | ||
| reply behaviour ignored. | ||
| * Replying to an edit should be treated in the UI as if you had replied to | ||
| the original message. | ||
|
|
||
| Do we need to support retrospective references? | ||
| * For something like "m.duplicate" to retrospectively declare that one event | ||
| dupes another, we might need to bundle two-levels deep (subject+ref and then | ||
| ref+target). We can cross this bridge when we get there though, as a 4th | ||
| aggregation type | ||
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.
Uh oh!
There was an error while loading. Please reload this page.