mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 14:13:21 +00:00
group chat msg preview: show author name
This commit is contained in:
parent
11e18acfbf
commit
a3d8d53bd4
@ -1232,6 +1232,9 @@ function addChat(channel) {
|
||||
if (!chats[pub].latest || msg.time > chats[pub].latest.time) {
|
||||
chats[pub].latest = msg;
|
||||
var text = truncateString(msg.text, 100);
|
||||
if (chats[pub].uuid && !msg.selfAuthored && msg.info.from && chats[pub].participantProfiles[msg.info.from].name) {
|
||||
text = chats[pub].participantProfiles[msg.info.from].name + ': ' + text;
|
||||
}
|
||||
var now = new Date();
|
||||
var latestTimeText = iris.util.getDaySeparatorText(msg.time, msg.time.toLocaleDateString({dateStyle:'short'}));
|
||||
if (latestTimeText === 'today') { latestTimeText = iris.util.formatTime(msg.time); }
|
||||
|
Loading…
Reference in New Issue
Block a user