element-hq / element-hq/element-web

Implement MSC3720 to determine whether a user exists

Open
#23,465 0 comments 0 reactions 0 assignees View on GitHub
A-Invite O-Uncommon T-Enhancement
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your use case

#### What would you like to do?

Currently when Element checks whether a user exists (e.g. when someone wants to invite another user into a room), it makes a profile request for that user (presumably for the lack of a better mechanism). However, this is prone to false negatives as it is valid for a Matrix user to not have a profile.

#### Why would you like to do it?

To be able to reliably tell if a user does not exist, instead of whether they might exist without a profile.

#### How would you like to achieve it?

[MSC3720](https://github.com/matrix-org/matrix-spec-proposals/pull/3720), which is already implemented in Synapse, provides a simple way for clients to check if a user (local or remote) exists and is active. I would propose the check in Element to verify if a user exists is changed to using this, with maybe a temporary fallback to check the profile if the homeserver does not support the MSC or the user appears in `failures` in the response.

### Have you considered any alternatives?

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.