-
Notifications
You must be signed in to change notification settings - Fork 121
[E2E] Megolm outbound sessions #240
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
Conversation
|
Pointer to a discussion about an old version of |
matrix_client/room.py
Outdated
| is unencrypted. | ||
| """ | ||
| if not self.client._encryption or not self.encrypted: | ||
| raise RuntimeError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is RuntimeError the best exception to be raised here (it might be, but I've never used it before, so I don't know when it'd be appropriate)? My approach would have been to define a new MatrixNotEncrypted exception or something along those lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I've been lazy (and wasn't sure if it was worth a new exception). Note that the doc says about RuntimeError "Raised when an error is detected that doesn’t fall in any of the other categories.", so it was probably the best built-in exception :)
Use a thread to allow downloading the keys in a non-blocking way. Implement sort of a queue of users who need updating, which should be efficient (request is fired as soon as possible with as much data as possible) and avoid races (we always have only one download in progress).
This has the effect of tracking the device lists of users proactively.
Here's the part about sending encrypted group messages, both the crypto bits and the integration into the client.
Signed-off-by: Valentin Deniaud <valentin.deniaud@inpt.fr>