`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
14 lines
312 B
JavaScript
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
|
|
);
|
|
}
|
|
}
|