diff --git a/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.js b/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.js new file mode 100644 index 00000000000..c74e0236a65 --- /dev/null +++ b/plugins/chat/assets/javascripts/discourse/components/reviewable-chat-message.js @@ -0,0 +1,13 @@ +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 + ); + } +} diff --git a/plugins/chat/assets/javascripts/discourse/templates/components/reviewable-chat-message.hbs b/plugins/chat/assets/javascripts/discourse/templates/components/reviewable-chat-message.hbs index d35ba2d501e..8415b7131e3 100644 --- a/plugins/chat/assets/javascripts/discourse/templates/components/reviewable-chat-message.hbs +++ b/plugins/chat/assets/javascripts/discourse/templates/components/reviewable-chat-message.hbs @@ -1,21 +1,21 @@
- - + +
- +
- +
- {{html-safe (or this.reviewable.payload.message_cooked this.reviewable.cooked)}} + {{html-safe (or @reviewable.payload.message_cooked @reviewable.cooked)}}
- {{#if this.reviewable.payload.transcript_topic_id}} + {{#if @reviewable.payload.transcript_topic_id}}
- + {{i18n "review.transcript.view"}}