Skip to content

Commit 0b6a092

Browse files
committed
fix: show author of last message in leftpane for groups
1 parent 3966995 commit 0b6a092

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ts/models/message.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ export class MessageModel extends Model<MessageAttributes> {
404404
);
405405
}
406406
});
407+
if (this.getConversation()?.isOpenGroupV2() || this.getConversation()?.isClosedGroupV2()) {
408+
const source = this.get('source');
409+
410+
const author = isUsAnySogsFromCache(source)
411+
? tr('you')
412+
: ConvoHub.use().getNicknameOrRealUsernameOrPlaceholder(source);
413+
return tr('messageSnippetGroup', { author, message_snippet: bodyMentionsMappedToNames });
414+
}
407415
return bodyMentionsMappedToNames;
408416
}
409417

0 commit comments

Comments
 (0)