-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Story] Check room's address for invalid symbols and availability #2585
Comments
It seems the Matrix spec does not define a clear grammar for the local part (#local_part:homeserver.com) of the room alias, and thus what's implemented on EW, seems to be its own best practice. As there is no good reason to change it, and we want the clients to be in sync - @florianduros could you please point out the code in EW which validates the room alias, so we can use this as a reference when implementing in EX and also use to describe to user on UI what is allowed and what is not. |
@jmartinesp Has found the corresponding code in EW, this prevents using:
We will stick to this implementation as a change is currently not justified, and not directly related to the scope. The tips on the UI for the end user may be slightly more restrictive for the purpose of keeping it understandable for them. |
FWIW this is already handled in Rust in the Ruma crate. Maybe instead of adding custom logic per-client we should create a shared |
A note that for checking the availability of the address, EW is using this API, e.g. making a GET request to:
|
Updated the description to confirm that we check the availability as well as invalid symbols "live" as user is editing the address. |
Agreed that we do not introduce the "green confirmation" that address is available on EX. To be decided if we keep it on EW where it already exists. |
Description
Checking the address for both invalid symbols and availability is done "in live" as the user is editing the address.
Since this a functionality that already exists in EW, the algorithm for checking for invalid symbols and other constraints is borrowed from EW which currently prevents using the following symbols:
:
,,
and#
(Note that Matrix spec on identifiers unfortunately does not specify any specific rules for the local part of room alias.)
Same goes for checking if the room address is available - the approach for this can be borrowed from EW and adjusted as necessary.
Note that these checks would need to be applied both at room creation and when changing room settings later.
Designs:
Acceptance criteria
Size estimate
None
Dependencies
Out of scope
Open questions
Questions
Subtasks
Android
iOS
Rust
Other
The text was updated successfully, but these errors were encountered: