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/components/reviewable-chat-message.js
David Taylor 105f500693
FIX: Show chat channel info on reviewable items (#19260)
`reviewable.chat_channel` is a plain javascript object from the server's JSON response. We need to turn it into a true `ChatChannel` object before passing to `<ChatChannelTitle>`

This commit also converts `<ReviewableChatMessage>` to a Glimmer component
2022-11-30 14:08:30 +00:00

14 lines
312 B
JavaScript

import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
export default class ReviewableChatMessage extends Component {
@service store;
get chatChannel() {
return this.store.createRecord(
"chat-channel",
this.args.reviewable.chat_channel
);
}
}