Open richvdh opened 1 year ago
Looks like we'll have to expose this functionality in the rust matrix-crypto-sdk as well
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.queueToDevice
on the results.
I'd suggest adding a new api
encryptToDeviceMessages
toCryptoApi
, which takes an array of(user_id, device_id)
pairs. The application can then callMatrixClient.queueToDevice
on the results.
This sounds perfect 👍
n.b. https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/issues/140 is a blocker.
@richvdh I have started an implementation at https://github.com/matrix-org/matrix-js-sdk/pull/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.
Dealing with the breaking changes in matrix-sdk-crypto-wasm is now a blocker: https://github.com/matrix-org/matrix-js-sdk/pull/4396
This is used by element call, which could otherwise be an early adopter of the rustified crypto.