-
-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change how MatrixEvent manages encrypted events
Make `MatrixEvent.event` contain the *encrypted* event, and keep the plaintext payload in a separate `_clearEvent` property. This achieves several aims: * means that we have a record of the actual object which was received over the wire, which can be shown by clients for 'view source'. * makes sent and received encrypted MatrixEvents more consistent (previously sent ones had `encryptedType` and `encryptedContent` properties, whereas received ones threw away the ciphertext). * Avoids having to make two MatrixEvents in the receive path, and copying fields from one to the other. *Hopefully* most clients have followed the advice given in the jsdoc of not relying on MatrixEvent.event to get at events. If they haven't, I guess they'll break in the face of encrypted events. (The pushprocessor didn't follow this advice, so needed some tweaks.)
- Loading branch information
Showing
5 changed files
with
111 additions
and
87 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.