Pārlūkot izejas kodu

participants: skip local participant join notification

Also, use the helper function to get the display name for a participant.
master
Saúl Ibarra Corretgé 6 gadus atpakaļ
vecāks
revīzija
186ba70cb7

+ 1
- 4
react/features/base/participants/actions.js Parādīt failu

@@ -1,5 +1,3 @@
1
-/* global interfaceConfig */
2
-
3 1
 import throttle from 'lodash/throttle';
4 2
 
5 3
 import { set } from '../redux';
@@ -517,8 +515,7 @@ const _throttledNotifyParticipantConnected = throttle(dispatch => {
517 515
  * @returns {Function}
518 516
  */
519 517
 export function showParticipantJoinedNotification(displayName) {
520
-    joinedParticipantsNames.push(
521
-        displayName || interfaceConfig.DEFAULT_REMOTE_DISPLAY_NAME);
518
+    joinedParticipantsNames.push(displayName);
522 519
 
523 520
     return dispatch => _throttledNotifyParticipantConnected(dispatch);
524 521
 }

+ 3
- 3
react/features/base/participants/middleware.js Parādīt failu

@@ -118,10 +118,10 @@ MiddlewareRegistry.register(store => next => action => {
118 118
     case PARTICIPANT_JOINED: {
119 119
         _maybePlaySounds(store, action);
120 120
 
121
-        const { participant: { name } } = action;
121
+        const { participant: p } = action;
122 122
 
123
-        if (name) {
124
-            store.dispatch(showParticipantJoinedNotification(name));
123
+        if (!p.local) {
124
+            store.dispatch(showParticipantJoinedNotification(getParticipantDisplayName(store.getState, p.id)));
125 125
         }
126 126
 
127 127
         return _participantJoinedOrUpdated(store, next, action);

Notiek ielāde…
Atcelt
Saglabāt