|
@@ -115,7 +115,7 @@ function _addChatMsgListener(conference, { dispatch, getState }) {
|
115
|
115
|
|
116
|
116
|
conference.on(
|
117
|
117
|
JitsiConferenceEvents.MESSAGE_RECEIVED,
|
118
|
|
- (id, message, timestamp) => {
|
|
118
|
+ (id, message, timestamp, nick) => {
|
119
|
119
|
// Logic for all platforms:
|
120
|
120
|
const state = getState();
|
121
|
121
|
const { isOpen: isChatOpen } = state['features/chat'];
|
|
@@ -127,7 +127,7 @@ function _addChatMsgListener(conference, { dispatch, getState }) {
|
127
|
127
|
// Provide a default for for the case when a message is being
|
128
|
128
|
// backfilled for a participant that has left the conference.
|
129
|
129
|
const participant = getParticipantById(state, id) || {};
|
130
|
|
- const displayName = getParticipantDisplayName(getState, id);
|
|
130
|
+ const displayName = participant.name || nick || getParticipantDisplayName(state, id);
|
131
|
131
|
const hasRead = participant.local || isChatOpen;
|
132
|
132
|
const timestampToDate = timestamp
|
133
|
133
|
? new Date(timestamp) : new Date();
|