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.js
Joffrey JAFFEUX 62685c1a76 DEV: refactors routes to simplify using outlet
This work will allow us to have an {{outlet}} chat.channel route and use it for threads as a sidepanel.
2023-02-06 14:27:35 +01:00

18 lines
386 B
JavaScript

import Controller from "@ember/controller";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
export default class ChatChannelController extends Controller {
@service chat;
targetMessageId = null;
// Backwards-compatibility
queryParams = ["messageId"];
@action
switchChannel(channel) {
this.chat.openChannel(channel);
}
}