mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
18 lines
374 B
JavaScript
18 lines
374 B
JavaScript
import { service } from "@ember/service";
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
export default class ChatDraftChannelRoute extends DiscourseRoute {
|
|
@service chat;
|
|
@service router;
|
|
|
|
beforeModel() {
|
|
if (!this.chat.userCanDirectMessage) {
|
|
this.router.transitionTo("chat");
|
|
}
|
|
}
|
|
|
|
activate() {
|
|
this.chat.activeChannel = null;
|
|
}
|
|
}
|