Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(display-name): listen for display name changes

Leonard Kimf0a180cf0c0a
diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.js
index 11856ca69d..55c8d9f699 100644
--- a/react/features/base/conference/actions.js
+++ b/react/features/base/conference/actions.js
@@ -11,6 +11,7 @@ import { getName } from '../../app';
import { JitsiConferenceEvents } from '../lib-jitsi-meet';
import { setAudioMuted, setVideoMuted } from '../media';
import {
+ MAX_DISPLAY_NAME_LENGTH,
dominantSpeakerChanged,
participantConnectionStatusChanged,
participantJoined,
@@ -120,6 +121,12 @@ function _addConferenceListeners(conference, dispatch) {
t => t && !t.isLocal() && dispatch(trackRemoved(t)));
// Dispatches into features/base/participants follow:
+ conference.on(
+ JitsiConferenceEvents.DISPLAY_NAME_CHANGED,
+ (id, displayName) => dispatch(participantUpdated({
+ id,
+ name: displayName.substr(0, MAX_DISPLAY_NAME_LENGTH)
+ })));
conference.on(
JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED,