Skip to content
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

Merged
merged 12 commits into from
Oct 25, 2023

Conversation

florianduros
Copy link
Contributor

@florianduros florianduros commented Oct 17, 2023

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

Closes element-hq/element-web#26318


Here's what your changelog entry will look like:

✨ Features

/* FIXME historyVisibility, etc */

// We only support megolm
rustEncryptionSettings.algorithm = EncryptionAlgorithm.MegolmV1AesSha2;
Copy link
Contributor Author

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 field this.encryptionSettings.algoritm to the rust EncryptionAlgorithm enum

The second solution appears to me useless since we are only using Megolm

Copy link
Member

@richvdh richvdh left a 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);
Copy link
Member

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

@florianduros florianduros added this pull request to the merge queue Oct 23, 2023
@florianduros florianduros added this pull request to the merge queue Oct 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2023
@florianduros florianduros added this pull request to the merge queue Oct 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2023
@florianduros florianduros added this pull request to the merge queue Oct 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2023
@florianduros florianduros added this pull request to the merge queue Oct 24, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2023
@florianduros florianduros added this pull request to the merge queue Oct 25, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 25, 2023
# Conflicts:
#	spec/integ/crypto/crypto.spec.ts
#	src/rust-crypto/RoomEncryptor.ts
@florianduros florianduros added this pull request to the merge queue Oct 25, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 25, 2023
@florianduros florianduros added this pull request to the merge queue Oct 25, 2023
Merged via the queue into develop with commit f8f22a3 Oct 25, 2023
19 checks passed
@florianduros florianduros deleted the florianduros/elementr/wire-up-rotation branch October 25, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element R: m.room.encryption rotation_period_* are ignored
2 participants