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

Implement MatrixClient.encryptAndSendToDevices for rust crypto and add CryptoApi.encryptToDeviceMessages #4380

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

hughns
Copy link
Member

@hughns hughns commented Sep 2, 2024

Fixes #3304

  • Adds CryptoApi.encryptToDeviceMessages.
  • Deprecates Crypto.encryptAndSendToDevices.
  • MatrixClient.encryptAndSendToDevices is overloaded to support both CryptoApi and pre-CryptoApi API flavours - I think ideally we would deprecate the current function. So, perhaps it would be better to make a new function and deprecate this entirely?

Depends on matrix-org/matrix-rust-sdk-crypto-wasm#140 and #4396

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

Deprecate Crypto. encryptAndSendToDevices and MatrixClient. encryptAndSendToDevices
@hughns hughns added T-Enhancement T-Deprecation A pull request that makes something deprecated labels Sep 2, 2024
@hughns hughns changed the title Add CryptoApi. encryptToDeviceMessages Implement MatrixClient.encryptAndSendToDevices for rust crypto and add CryptoApi.encryptToDeviceMessages Sep 2, 2024
@richvdh richvdh self-requested a review September 2, 2024 12:23
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.

looks like the right general direction to me

src/client.ts Outdated Show resolved Hide resolved
src/crypto-api/index.ts Outdated Show resolved Hide resolved
src/crypto-api/index.ts Outdated Show resolved Hide resolved
src/rust-crypto/rust-crypto.ts Outdated Show resolved Hide resolved
@hughns hughns changed the base branch from develop to hughns/matrix-sdk-crypto-wasm-8 September 9, 2024 09:58
@hughns hughns changed the base branch from hughns/matrix-sdk-crypto-wasm-8 to develop September 18, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Deprecation A pull request that makes something deprecated T-Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element-R: wire up encryptAndSendToDevices
2 participants