Parcourir la source

fix(notifications) skip participant joined notifications before we join

master
Saúl Ibarra Corretgé il y a 4 ans
Parent
révision
5dc03f56f6
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 5
    3
      react/features/notifications/middleware.js

+ 5
- 3
react/features/notifications/middleware.js Voir le fichier

33
         const result = next(action);
33
         const result = next(action);
34
         const { participant: p } = action;
34
         const { participant: p } = action;
35
         const { dispatch, getState } = store;
35
         const { dispatch, getState } = store;
36
+        const state = getState();
37
+        const { conference } = state['features/base/conference'];
36
 
38
 
37
-        if (!p.local && !joinLeaveNotificationsDisabled() && !p.isReplacing) {
39
+        if (conference && !p.local && !joinLeaveNotificationsDisabled() && !p.isReplacing) {
38
             dispatch(showParticipantJoinedNotification(
40
             dispatch(showParticipantJoinedNotification(
39
-                getParticipantDisplayName(getState, p.id)
41
+                getParticipantDisplayName(state, p.id)
40
             ));
42
             ));
41
         }
43
         }
42
 
44
 
43
         if (typeof interfaceConfig === 'object'
45
         if (typeof interfaceConfig === 'object'
44
                 && !interfaceConfig.DISABLE_FOCUS_INDICATOR && p.role === PARTICIPANT_ROLE.MODERATOR) {
46
                 && !interfaceConfig.DISABLE_FOCUS_INDICATOR && p.role === PARTICIPANT_ROLE.MODERATOR) {
45
             // Do not show the notification for mobile and also when the focus indicator is disabled.
47
             // Do not show the notification for mobile and also when the focus indicator is disabled.
46
-            const displayName = getParticipantDisplayName(getState, p.id);
48
+            const displayName = getParticipantDisplayName(state, p.id);
47
 
49
 
48
             if (!p.isReplacing) {
50
             if (!p.isReplacing) {
49
                 dispatch(showNotification({
51
                 dispatch(showNotification({

Chargement…
Annuler
Enregistrer