Skip to content

Commit

Permalink
added senderIsCreator property to know who is the creator of the ch…
Browse files Browse the repository at this point in the history
…at channel from chat window component
  • Loading branch information
roncodes committed Apr 4, 2024
1 parent a27f5a1 commit 6d1a594
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addon/components/chat-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ export default class ChatWindowComponent extends Component {
@service currentUser;
@tracked channel;
@tracked sender;
@tracked senderIsCreator;
@tracked pendingMessageContent = '';

constructor(owner, { channel }) {
super(...arguments);
this.channel = channel;
this.sender = this.getSenderFromParticipants(channel);
this.senderIsCreator = this.sender ? this.sender.id === channel.created_by_uuid : false;
}

@action sendMessage() {
Expand Down

0 comments on commit 6d1a594

Please sign in to comment.