Skip to content
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

Implement set/unset/show for alternative and canonical aliases #279

Merged
merged 5 commits into from
Aug 1, 2024

Conversation

Lymkwi
Copy link
Contributor

@Lymkwi Lymkwi commented May 1, 2024

This commit solves #50 by providing a way to:

  • Set the canonical alias of a room (destroying the previous one if any)
  • Unset the canonical alias of a room (destroying the previous one if any)
  • Add an alternative alias to a room
  • Delete an alternative alias to a room (destroying it afterwards)

Lymkwi and others added 5 commits May 2, 2024 01:34
This commit solves ulyssa#50 by providing a way to:
 - Set the canonical alias of a room (destroying the previous one if any)
 - Unset the canonical alias of a room (destroying the previous one if
   any)
 - Add an alternative alias to a room
 - Delete an alternative alias to a room (destroying it afterwards)

Signed-off-by: lymkwi <[email protected]>
This command lets you access some information about a room, shown as
message info. With it, for now, you can show alternative aliases and the
canonical alisa of a room.

Signed-off-by: lymkwi <[email protected]>
* Remove unreachable!() to future proof for custom commands support
* Print message when doing no-ops
* Demote old canonical alias instead of deleting it
* Check canonical_alias when removing alias
* Use HashSet to avoid duplicate aliases in state event
* Use Pager for long alias lists
* Use HTTP 409 Conflict to catch when alias already exists
@ulyssa
Copy link
Owner

ulyssa commented Aug 1, 2024

This is a really great addition! Thank you so much for adding this, @Lymkwi ! 🥳

While playing around with this, I ended up changing the behaviour when setting a new canonical alias to put it into the alt aliases instead, so that people have a natural way to set new canonical aliases while keeping the old around for joining. If someone does want to get rid of it, then they can do :room alias unset #oldcanonicalalias:homeserver.com.

@ulyssa ulyssa changed the title Implement aliases/canonical aliases set/unset Implement setting, unsetting, and showing alternative and canonical aliases Aug 1, 2024
@ulyssa ulyssa changed the title Implement setting, unsetting, and showing alternative and canonical aliases Implement set/unset/show for alternative and canonical aliases Aug 1, 2024
@ulyssa ulyssa enabled auto-merge (squash) August 1, 2024 06:36
@ulyssa ulyssa merged commit 4571788 into ulyssa:main Aug 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants