Skip to content

[FFI] Prevent Encryption.userIdentity to fetch server if not required #5867

@ganfra

Description

@ganfra

Use case

We are presenting the list of room members, and we want to decorate them with Verified or VerificationViolation. Other identity states are not rendered.
Currently, Encryption.userIdentity is calling request_user_identity for all the users we have never verified.
We'd like to avoid that, as the requests are pretty slow and useless. We can rely instead on crypto store and subscribe to the user identity stream to get updates.

Proposal

Update the Encryption.userIdentity api from
fn userIdentity(userId: String)
to
fn userIdentity(userId: String, fetchFromHomeserverIfNeeded: Boolean)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions