Get chat message display name from backend
This commit is contained in:
parent
b5489b7c81
commit
e7144eb674
|
@ -9073,8 +9073,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lib-jitsi-meet": {
|
"lib-jitsi-meet": {
|
||||||
"version": "github:jitsi/lib-jitsi-meet#3c8058743177b6b6963d3bc3df14f4ea650ef310",
|
"version": "github:jitsi/lib-jitsi-meet#502ba82e1e4e4cdf8fe768566b6414f5c100491a",
|
||||||
"from": "github:jitsi/lib-jitsi-meet#3c8058743177b6b6963d3bc3df14f4ea650ef310",
|
"from": "github:jitsi/lib-jitsi-meet#502ba82e1e4e4cdf8fe768566b6414f5c100491a",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jitsi/sdp-interop": "0.1.14",
|
"@jitsi/sdp-interop": "0.1.14",
|
||||||
"@jitsi/sdp-simulcast": "0.2.1",
|
"@jitsi/sdp-simulcast": "0.2.1",
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
"js-utils": "github:jitsi/js-utils#192b1c996e8c05530eb1f19e82a31069c3021e31",
|
"js-utils": "github:jitsi/js-utils#192b1c996e8c05530eb1f19e82a31069c3021e31",
|
||||||
"jsrsasign": "8.0.12",
|
"jsrsasign": "8.0.12",
|
||||||
"jwt-decode": "2.2.0",
|
"jwt-decode": "2.2.0",
|
||||||
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#3c8058743177b6b6963d3bc3df14f4ea650ef310",
|
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#502ba82e1e4e4cdf8fe768566b6414f5c100491a",
|
||||||
"libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
|
"libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
|
||||||
"lodash": "4.17.11",
|
"lodash": "4.17.11",
|
||||||
"moment": "2.19.4",
|
"moment": "2.19.4",
|
||||||
|
|
|
@ -74,10 +74,13 @@ class ChatMessage extends AbstractChatMessage<Props> {
|
||||||
* @returns {React$Element<*>}
|
* @returns {React$Element<*>}
|
||||||
*/
|
*/
|
||||||
_renderAvatar() {
|
_renderAvatar() {
|
||||||
|
const { message } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style = { styles.avatarWrapper }>
|
<View style = { styles.avatarWrapper }>
|
||||||
{ this.props.showAvatar && <Avatar
|
{ this.props.showAvatar && <Avatar
|
||||||
participantId = { this.props.message.id }
|
displayName = { message.displayName }
|
||||||
|
participantId = { message.id }
|
||||||
size = { styles.avatarWrapper.width } />
|
size = { styles.avatarWrapper.width } />
|
||||||
}
|
}
|
||||||
</View>
|
</View>
|
||||||
|
|
|
@ -115,7 +115,7 @@ function _addChatMsgListener(conference, { dispatch, getState }) {
|
||||||
|
|
||||||
conference.on(
|
conference.on(
|
||||||
JitsiConferenceEvents.MESSAGE_RECEIVED,
|
JitsiConferenceEvents.MESSAGE_RECEIVED,
|
||||||
(id, message, timestamp) => {
|
(id, message, timestamp, nick) => {
|
||||||
// Logic for all platforms:
|
// Logic for all platforms:
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const { isOpen: isChatOpen } = state['features/chat'];
|
const { isOpen: isChatOpen } = state['features/chat'];
|
||||||
|
@ -127,7 +127,7 @@ function _addChatMsgListener(conference, { dispatch, getState }) {
|
||||||
// Provide a default for for the case when a message is being
|
// Provide a default for for the case when a message is being
|
||||||
// backfilled for a participant that has left the conference.
|
// backfilled for a participant that has left the conference.
|
||||||
const participant = getParticipantById(state, id) || {};
|
const participant = getParticipantById(state, id) || {};
|
||||||
const displayName = getParticipantDisplayName(getState, id);
|
const displayName = participant.name || nick || getParticipantDisplayName(state, id);
|
||||||
const hasRead = participant.local || isChatOpen;
|
const hasRead = participant.local || isChatOpen;
|
||||||
const timestampToDate = timestamp
|
const timestampToDate = timestamp
|
||||||
? new Date(timestamp) : new Date();
|
? new Date(timestamp) : new Date();
|
||||||
|
|
Loading…
Reference in New Issue