matrix-org/matrix-ios-sdk

CryptoV2 is not tracking users on membership changes, and only querying keys for unknown users if forceDownload is true

Closed this issue · 0 comments

MXCryptoV2 is not listening to room membership events of encrypted rooms in order to start tracking their devices (ask olmMachine to query keys).
That is problematic if computeE2ERoomSummaryTrust is FALSE, as the keys will be downloaded later when sending a message, and that could affect message sending time.

Also MXCryptoV2.downloadKeys looks like it's not behaving as expected?
If forceDownload is false, it will only return keys in cache.
It should in this case check what keys are missing from the provided user list, and only querying for them and return the newly downloaded one + the one that are already in cache