DEV: removes deprecated code (#23183)

This commit is contained in:
Joffrey JAFFEUX
2023-08-22 15:53:37 +02:00
committed by GitHub
parent 0afddca0b9
commit 2d8a38f883
4 changed files with 2 additions and 27 deletions

View File

@ -1,10 +1,5 @@
export default function () {
this.route("chat", { path: "/chat" }, function () {
// TODO(roman): Remove after the 3.1 release
this.route("channel-legacy", {
path: "/channel/:channelId/:channelTitle",
});
this.route("channel", { path: "/c/:channelTitle/:channelId" }, function () {
this.route("near-message", { path: "/:messageId" });
this.route("threads", { path: "/t" });

View File

@ -31,19 +31,10 @@ export default function withChatChannel(extendedClass) {
return this.router.replaceWith("chat");
}
let { messageId, channelTitle } = this.paramsFor(this.routeName);
// messageId query param backwards-compatibility
if (messageId) {
this.router.replaceWith(
"chat.channel",
...model.routeModels,
messageId
);
}
let { channelTitle } = this.paramsFor(this.routeName);
if (channelTitle && channelTitle !== model.slugifiedTitle) {
messageId = this.paramsFor("chat.channel.near-message").messageId;
const messageId = this.paramsFor("chat.channel.near-message").messageId;
const threadId = this.paramsFor("chat.channel.thread").threadId;
if (threadId) {