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 b89df3ca9d
DEV: refactors routes to simplify using outlet (#20179)
This work will allow us to have an {{outlet}} chat.channel route and use it for threads as a sidepanel.
2023-02-07 13:59:32 +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);
}
}