mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
remove local aliases from old room on upgrade
Without explicitly removing the old alias when reassigning aliases, we
were listing the alias on both rooms in the GET client/v3/rooms/{roomId}/aliases
endpoint. Resolving the alias still always pointed to the correct room.
This commit is contained in:
parent
48ecf50973
commit
07fb57be06
2 changed files with 6 additions and 0 deletions
|
|
@ -242,6 +242,9 @@ This will be the first release of Grapevine since it was forked from Conduit
|
||||||
([!158](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/158))
|
([!158](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/158))
|
||||||
28. Fix read receipts not being sent over federation (or only arbitrarily late)
|
28. Fix read receipts not being sent over federation (or only arbitrarily late)
|
||||||
([!162](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/162))
|
([!162](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/162))
|
||||||
|
29. Remove local aliases from old room when assigning them to a new room during
|
||||||
|
a room upgrade.
|
||||||
|
([!186](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/186))
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,9 @@ impl Service {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.resolve_local_alias(alias)?.is_some() {
|
||||||
|
self.remove_alias(alias, user_id)?;
|
||||||
|
}
|
||||||
self.db.set_alias(alias, room_id)
|
self.db.set_alias(alias, room_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue