Skip to content

Commit

Permalink
Don't double up sender name
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Oct 24, 2024
1 parent c267f59 commit 60e1356
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions snikket/Chat.hx
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ abstract class Chat {
return switch (lastMessage.type) {
case MessageCall:
lastMessage.isIncoming() ? "Incoming Call" : "Outgoing Call";
case MessageChannel:
getParticipantDetails(lastMessage.senderId()).displayName + ": " + lastMessage.text;
default:
lastMessage.text;
}
Expand Down Expand Up @@ -961,7 +959,8 @@ class Channel extends Chat {

override public function preview() {
if (lastMessage == null) return super.preview();
return lastMessage.sender.resource + ": " + super.preview();

return getParticipantDetails(lastMessage.senderId()).displayName + ": " + super.preview();
}

@:allow(snikket)
Expand Down

0 comments on commit 60e1356

Please sign in to comment.