-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Element-R: Wire up room rotation #3807
Element-R: Wire up room rotation #3807
Conversation
9a1850d
to
19eaad5
Compare
19eaad5
to
1609944
Compare
1609944
to
baa2088
Compare
baa2088
to
c9ae562
Compare
c9ae562
to
7bbe247
Compare
/* FIXME historyVisibility, etc */ | ||
|
||
// We only support megolm | ||
rustEncryptionSettings.algorithm = EncryptionAlgorithm.MegolmV1AesSha2; |
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.
Two solutions here:
- Set directly the Megolm algorithm since we currently only supporting megolm and we are checking at the beginning at the function that we are using Megolm.
- Use the value from
this.encryptionSettings
, it means that we need to convert the string in the fieldthis.encryptionSettings.algoritm
to the rustEncryptionAlgorithm
enum
The second solution appears to me useless since we are only using Megolm
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.
lgtm
// See https://spec.matrix.org/v1.8/client-server-api/#mroomencryption and | ||
// https://matrix-org.github.io/matrix-rust-sdk-crypto-wasm/classes/EncryptionSettings.html#rotationPeriod | ||
if (typeof this.encryptionSettings.rotation_period_ms === "number") { | ||
rustEncryptionSettings.rotationPeriod = BigInt(this.encryptionSettings.rotation_period_ms * 1000); |
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.
it's a bit silly that the Rust EncryptionSettings
wants a bigint rather than a number
, but hohum
# Conflicts: # spec/integ/crypto/crypto.spec.ts # src/rust-crypto/RoomEncryptor.ts
Checklist
Closes element-hq/element-web#26318
Here's what your changelog entry will look like:
✨ Features
m.room.encryption
rotation_period_* are ignored element-hq/element-web#26318. Contributed by @florianduros.