This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/chat/assets/javascripts/discourse/controllers/chat-channel-toggle.js
2023-02-24 12:47:42 +01:00

17 lines
416 B
JavaScript

import Modal from "discourse/controllers/modal";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
export default class ChatChannelToggleController extends Modal {
@service chat;
@service router;
chatChannel = null;
@action
channelStatusChanged(channel) {
this.send("closeModal");
this.router.transitionTo("chat.channel", ...channel.routeModels);
}
}