From d636ff216ad929bd9294048a90672750059e1ed4 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 1 Dec 2023 16:01:59 +0000 Subject: [PATCH] DEV: Resolve transitionTo deprecation in chat-channel route (#24668) --- .../chat/assets/javascripts/discourse/routes/chat-channel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/chat/assets/javascripts/discourse/routes/chat-channel.js b/plugins/chat/assets/javascripts/discourse/routes/chat-channel.js index e18f3f17692..2b282350dfb 100644 --- a/plugins/chat/assets/javascripts/discourse/routes/chat-channel.js +++ b/plugins/chat/assets/javascripts/discourse/routes/chat-channel.js @@ -5,6 +5,7 @@ import withChatChannel from "./chat-channel-decorator"; @withChatChannel export default class ChatChannelRoute extends DiscourseRoute { @service site; + @service router; redirect(model) { if (this.site.mobileView) { @@ -15,7 +16,7 @@ export default class ChatChannelRoute extends DiscourseRoute { const threadId = this.paramsFor("chat.channel.thread").threadId; if (!messageId && !threadId && model.threadsManager.unreadThreadCount > 0) { - this.transitionTo("chat.channel.threads", ...model.routeModels); + this.router.transitionTo("chat.channel.threads", ...model.routeModels); } } }