discourse/plugins/chat/assets/javascripts/discourse/routes/chat-channel-legacy.js
Joffrey JAFFEUX b89df3ca9d
DEV: refactors routes to simplify using outlet (#20179)
This work will allow us to have an {{outlet}} chat.channel route and use it for threads as a sidepanel.
2023-02-07 13:59:32 +01:00

17 lines
429 B
JavaScript

import DiscourseRoute from "discourse/routes/discourse";
import { inject as service } from "@ember/service";
export default class ChatChannelLegacyRoute extends DiscourseRoute {
@service router;
redirect() {
const { channelTitle, channelId, messageId } = this.paramsFor(
this.routeName
);
this.router.replaceWith("chat.channel", channelTitle, channelId, {
queryParams: { messageId },
});
}
}