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 encryptAndSendToDevices #3304

Open
richvdh opened this issue Apr 19, 2023 · 7 comments · May be fixed by #4380
Open

Element-R: wire up encryptAndSendToDevices #3304

richvdh opened this issue Apr 19, 2023 · 7 comments · May be fixed by #4380
Assignees
Labels
T-Task Tasks for the team like planning

Comments

@richvdh
Copy link
Member

richvdh commented Apr 19, 2023

This is used by element call, which could otherwise be an early adopter of the rustified crypto.

@richvdh
Copy link
Member Author

richvdh commented Apr 24, 2023

Looks like we'll have to expose this functionality in the rust matrix-crypto-sdk as well

@richvdh
Copy link
Member Author

richvdh commented May 9, 2023

Blocked on matrix-org/matrix-rust-sdk#1816

@richvdh
Copy link
Member Author

richvdh commented Aug 22, 2024

Given that MatrixClient.encryptAndSendToDevices takes a DeviceInfo, which is part of the legacy crypto stack, we won't be able to implement this directly.

I'd suggest adding a new api encryptToDeviceMessages to CryptoApi, which takes an array of (user_id, device_id) pairs. The application can then call MatrixClient.queueToDeviceon the results.

@hughns
Copy link
Member

hughns commented Aug 23, 2024

I'd suggest adding a new api encryptToDeviceMessages to CryptoApi, which takes an array of (user_id, device_id) pairs. The application can then call MatrixClient.queueToDeviceon the results.

This sounds perfect 👍

@hughns
Copy link
Member

hughns commented Aug 31, 2024

n.b. matrix-org/matrix-rust-sdk-crypto-wasm#140 is a blocker.

@hughns
Copy link
Member

hughns commented Sep 2, 2024

@richvdh I have started an implementation at #4380. On the API shape, might you be able to take a look and see if this is going in the right direction?

The motivation behind leaving a MatrixClient.encryptAndSendToDevices function is that it then works nicely when using the js-sdk as a matryoshka client within the widget API.

@hughns
Copy link
Member

hughns commented Sep 9, 2024

Dealing with the breaking changes in matrix-sdk-crypto-wasm is now a blocker: #4396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
4 participants