diff --git a/plugins/chat/assets/javascripts/discourse/chat-route-map.js b/plugins/chat/assets/javascripts/discourse/chat-route-map.js index a4e03558a2d..582253f65b5 100644 --- a/plugins/chat/assets/javascripts/discourse/chat-route-map.js +++ b/plugins/chat/assets/javascripts/discourse/chat-route-map.js @@ -20,6 +20,5 @@ export default function () { this.route("archived", { path: "/archived" }); }); this.route("message", { path: "/message/:messageId" }); - this.route("channelByName", { path: "/chat_channels/:channelName" }); }); } diff --git a/plugins/chat/assets/javascripts/discourse/routes/chat-channel-by-name.js b/plugins/chat/assets/javascripts/discourse/routes/chat-channel-by-name.js deleted file mode 100644 index ba6c91c245e..00000000000 --- a/plugins/chat/assets/javascripts/discourse/routes/chat-channel-by-name.js +++ /dev/null @@ -1,28 +0,0 @@ -import DiscourseRoute from "discourse/routes/discourse"; -import { defaultHomepage } from "discourse/lib/utilities"; -import { ajax } from "discourse/lib/ajax"; -import { inject as service } from "@ember/service"; - -export default class ChatChannelByNameRoute extends DiscourseRoute { - @service chat; - - async model(params) { - return ajax( - `/chat/chat_channels/${encodeURIComponent(params.channelName)}.json` - ) - .then((response) => { - this.transitionTo( - "chat.channel", - response.channel.id, - response.channel.title - ); - }) - .catch(() => this.replaceWith("/404")); - } - - beforeModel() { - if (!this.chat.userCanChat) { - return this.transitionTo(`discovery.${defaultHomepage()}`); - } - } -} diff --git a/plugins/chat/plugin.rb b/plugins/chat/plugin.rb index dd379b2152e..ba5e2d29171 100644 --- a/plugins/chat/plugin.rb +++ b/plugins/chat/plugin.rb @@ -627,12 +627,6 @@ after_initialize do # incoming_webhooks_controller routes post "/hooks/:key/slack" => "incoming_chat_webhooks#create_message_slack_compatible" - # chat_channel_controller routes - get "/chat_channels" => "chat_channels#index" - post "/chat_channels/:chat_channel_id/notification_settings" => - "chat_channels#notification_settings" - get "/chat_channels/:chat_channel_id" => "chat_channels#show" - # chat_controller routes get "/" => "chat#respond" get "/browse" => "chat#respond"