improve event format description of m.room.encrypted events#2413
Open
gewitternacht wants to merge 8 commits into
Open
improve event format description of m.room.encrypted events#2413gewitternacht wants to merge 8 commits into
gewitternacht wants to merge 8 commits into
Conversation
Signed-off-by: Johanna Stuber <johannas@element.io>
Signed-off-by: Johanna Stuber <johannas@element.io>
Signed-off-by: Johanna Stuber <johannas@element.io>
Signed-off-by: Johanna Stuber <johannas@element.io>
Signed-off-by: Johanna Stuber <johannas@element.io>
andybalaam
approved these changes
Jul 14, 2026
andybalaam
left a comment
Member
There was a problem hiding this comment.
Looks good to me, with one comment.
3 tasks
Signed-off-by: Johanna Stuber <johannas@element.io>
Member
|
(I've added some links to the existing spec to the PR description, for my own reference, and the benefit for future archaeologists) |
richvdh
reviewed
Jul 15, 2026
richvdh
left a comment
Member
There was a problem hiding this comment.
Thanks for this! A couple of comments.
| the form: | ||
| Note that when the event is received from the server, it will have additional | ||
| properties alongside the `content` property, including a `type` (with a value | ||
| of `m.room.encrypted`) and a `sender` property. In `content`, `ciphertext` |
Member
There was a problem hiding this comment.
Suggested change
| of `m.room.encrypted`) and a `sender` property. In `content`, `ciphertext` | |
| of `m.room.encrypted`) and a `sender` property. (See [Room event format](#room-event-format).) | |
| Within `content`, `ciphertext` |
maybe?
Contributor
Author
There was a problem hiding this comment.
Similarly to above: will Megolm-encrypted events always use the ClientEvent format, or could there be instances where the properties alongside content are different ones?
Member
There was a problem hiding this comment.
I'm not sure if the spec makes it explicit, but Megolm is only designed for use on room events, so in this case, yes such events will always use the ClientEvent format.
Signed-off-by: Johanna Stuber <johannas@element.io>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
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.
The current description for the format of the content of
m.room.encryptedOlm/Megolm events (see https://spec.matrix.org/v1.19/client-server-api/#molmv1curve25519-aes-sha2 and https://spec.matrix.org/v1.19/client-server-api/#mmegolmv1aes-sha2) is rather confusing, which I'm trying to improve by fixing the following issues (as discussed with @richvdh and @andybalaam):content, any properties liketypealongsidecontentare already fixed by how events look like (which is why they are now mentioned in the accompanying text)senderproperty alongsidecontent, which wasn't present in the JSON snippet before, but is referenced further belowbodycontained "payload", which is a very overloaded termciphertextwasn't really correctPull Request Checklist
Preview: https://pr2413--matrix-spec-previews.netlify.app