mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 12:54:51 +08:00
DEV: removes deprecated code (#23183)
This commit is contained in:
@ -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" });
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user