mirror of
https://github.com/discourse/discourse.git
synced 2025-02-11 13:48:28 +08:00
14 lines
347 B
JavaScript
14 lines
347 B
JavaScript
import { service } from "@ember/service";
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
export default class ChatBrowseIndexRoute extends DiscourseRoute {
|
|
@service router;
|
|
@service siteSettings;
|
|
|
|
afterModel() {
|
|
if (!this.siteSettings.chat_allow_archiving_channels) {
|
|
this.router.replaceWith("chat.browse");
|
|
}
|
|
}
|
|
}
|