|
@@ -60,6 +60,8 @@ import {
|
60
|
60
|
} from './functions';
|
61
|
61
|
import { PARTICIPANT_JOINED_FILE, PARTICIPANT_LEFT_FILE } from './sounds';
|
62
|
62
|
|
|
63
|
+import { hasRaisedHand, raiseHand } from '.';
|
|
64
|
+
|
63
|
65
|
declare var APP: Object;
|
64
|
66
|
|
65
|
67
|
/**
|
|
@@ -86,27 +88,14 @@ MiddlewareRegistry.register(store => next => action => {
|
86
|
88
|
break;
|
87
|
89
|
|
88
|
90
|
case DOMINANT_SPEAKER_CHANGED: {
|
89
|
|
- // Ensure the raised hand state is cleared for the dominant speaker
|
90
|
|
- // and only if it was set when this is the local participant
|
91
|
|
-
|
92
|
|
- const { conference, id } = action.participant;
|
|
91
|
+ // Lower hand through xmpp when local participant becomes dominant speaker.
|
|
92
|
+ const { id } = action.participant;
|
93
|
93
|
const state = store.getState();
|
94
|
94
|
const participant = getLocalParticipant(state);
|
95
|
95
|
const isLocal = participant && participant.id === id;
|
96
|
96
|
|
97
|
|
- if (isLocal && participant.raisedHandTimestamp === undefined) {
|
98
|
|
- // if local was undefined, let's leave it like that
|
99
|
|
- // avoids sending unnecessary presence updates
|
100
|
|
- break;
|
101
|
|
- }
|
102
|
|
-
|
103
|
|
- if (!getDisableRemoveRaisedHandOnFocus(state)) {
|
104
|
|
- participant && store.dispatch(participantUpdated({
|
105
|
|
- conference,
|
106
|
|
- id,
|
107
|
|
- local: isLocal,
|
108
|
|
- raisedHandTimestamp: 0
|
109
|
|
- }));
|
|
97
|
+ if (isLocal && hasRaisedHand(participant) && !getDisableRemoveRaisedHandOnFocus(state)) {
|
|
98
|
+ store.dispatch(raiseHand(false));
|
110
|
99
|
}
|
111
|
100
|
|
112
|
101
|
break;
|