|
@@ -161,11 +161,10 @@ function _addChatMsgListener(conference, store) {
|
161
|
161
|
|
162
|
162
|
conference.on(
|
163
|
163
|
JitsiConferenceEvents.MESSAGE_RECEIVED,
|
164
|
|
- (id, message, timestamp, nick) => {
|
|
164
|
+ (id, message, timestamp) => {
|
165
|
165
|
_handleReceivedMessage(store, {
|
166
|
166
|
id,
|
167
|
167
|
message,
|
168
|
|
- nick,
|
169
|
168
|
privateMessage: false,
|
170
|
169
|
timestamp
|
171
|
170
|
});
|
|
@@ -179,8 +178,7 @@ function _addChatMsgListener(conference, store) {
|
179
|
178
|
id,
|
180
|
179
|
message,
|
181
|
180
|
privateMessage: true,
|
182
|
|
- timestamp,
|
183
|
|
- nick: undefined
|
|
181
|
+ timestamp
|
184
|
182
|
});
|
185
|
183
|
}
|
186
|
184
|
);
|
|
@@ -215,7 +213,7 @@ function _handleChatError({ dispatch }, error) {
|
215
|
213
|
* @param {Object} message - The message object.
|
216
|
214
|
* @returns {void}
|
217
|
215
|
*/
|
218
|
|
-function _handleReceivedMessage({ dispatch, getState }, { id, message, nick, privateMessage, timestamp }) {
|
|
216
|
+function _handleReceivedMessage({ dispatch, getState }, { id, message, privateMessage, timestamp }) {
|
219
|
217
|
// Logic for all platforms:
|
220
|
218
|
const state = getState();
|
221
|
219
|
const { isOpen: isChatOpen } = state['features/chat'];
|
|
@@ -228,10 +226,9 @@ function _handleReceivedMessage({ dispatch, getState }, { id, message, nick, pri
|
228
|
226
|
// backfilled for a participant that has left the conference.
|
229
|
227
|
const participant = getParticipantById(state, id) || {};
|
230
|
228
|
const localParticipant = getLocalParticipant(getState);
|
231
|
|
- const displayName = participant.name || nick || getParticipantDisplayName(state, id);
|
|
229
|
+ const displayName = getParticipantDisplayName(state, id);
|
232
|
230
|
const hasRead = participant.local || isChatOpen;
|
233
|
|
- const timestampToDate = timestamp
|
234
|
|
- ? new Date(timestamp) : new Date();
|
|
231
|
+ const timestampToDate = timestamp ? new Date(timestamp) : new Date();
|
235
|
232
|
const millisecondsTimestamp = timestampToDate.getTime();
|
236
|
233
|
|
237
|
234
|
dispatch(addMessage({
|