Improve room alias management - #618
Open
nvrWhere wants to merge 2 commits into
Open
Conversation
nvrWhere
commented
Feb 11, 2023
Collaborator
- modify setCanonicalAlias and setLocalAliases to prevent the same alias being the canonical and an alt alias (the server doesn't prevent this)
- add functions to connection to map and unmap aliases on the server
- add function to map an alias to the current room on the server
added 2 commits
February 10, 2023 19:48
- modify setCanonicalAlias and setLocalAliases to prevent the same alias being the canonical and an alt alias (the server doesn't prevent this) - add functions to connection to map and unmap aliases on the server - add function to map an alias to the current room on the server
KitsuneRal
reviewed
Feb 12, 2023
KitsuneRal
left a comment
Member
There was a problem hiding this comment.
Before a detailed review, two questions:
- The specification seems to have no opinion on whether an alias can be a canonical one and included in
alt_aliases. Did you discuss it anywhere (in #matrix-spec, e.g.)? It would be great to cover this gap (if it is confirmed) to avoid different clients acting differently. And in fact, making the servers do the right changes would ultimately be the best solution. - No need to write the actual code but what do you expect the test for
Connection::mapAlias()would look like? I struggle to find a good criteria of this operation's completion. For reference,Connection::forgetRoom(), being an orchestration of two API calls too, returns a pointer to the last job so that callers (including tests) couldconnectto itsfinished()signal. Perhaps it's worth having the same logic here - once we have point 1 sorted out.
Collaborator
Author
For 1. I have to admit this is me just pushing this the next level down from what I did in neochat and your right that ideally it should try an be resolved at the spec level as it current say nothing. I'll ask when I get a chance. For 2. I agree as it stands right now the function does just start the job and hope. So returning the job pointer seems like the best way forward so that the errors can be checked if desired. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.