|
@@ -1,6 +1,7 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
3
|
3
|
import UIEvents from '../../../../service/UI/UIEvents';
|
|
4
|
+import { toggleE2EE } from '../../e2ee/actions';
|
4
|
5
|
import { NOTIFICATION_TIMEOUT, showNotification } from '../../notifications';
|
5
|
6
|
import { CALLING, INVITED } from '../../presence-status';
|
6
|
7
|
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app';
|
|
@@ -207,7 +208,7 @@ StateListenerRegistry.register(
|
207
|
208
|
(conference, store) => {
|
208
|
209
|
if (conference) {
|
209
|
210
|
const propertyHandlers = {
|
210
|
|
- 'e2eeEnabled': (participant, value) => _e2eeUpdated(store, conference, participant.getId(), value),
|
|
211
|
+ 'e2ee.enabled': (participant, value) => _e2eeUpdated(store, conference, participant.getId(), value),
|
211
|
212
|
'features_e2ee': (participant, value) =>
|
212
|
213
|
store.dispatch(participantUpdated({
|
213
|
214
|
conference,
|
|
@@ -270,12 +271,16 @@ StateListenerRegistry.register(
|
270
|
271
|
* @param {Function} dispatch - The Redux dispatch function.
|
271
|
272
|
* @param {Object} conference - The conference for which we got an update.
|
272
|
273
|
* @param {string} participantId - The ID of the participant from which we got an update.
|
273
|
|
- * @param {boolean} newValue - The new value of the E2EE enabled status.
|
|
274
|
+ * @param {boolean} newValue - The new value of the E2EE enabled status.
|
274
|
275
|
* @returns {void}
|
275
|
276
|
*/
|
276
|
277
|
function _e2eeUpdated({ dispatch }, conference, participantId, newValue) {
|
277
|
278
|
const e2eeEnabled = newValue === 'true';
|
278
|
279
|
|
|
280
|
+ if (e2eeEnabled) {
|
|
281
|
+ dispatch(toggleE2EE(e2eeEnabled));
|
|
282
|
+ }
|
|
283
|
+
|
279
|
284
|
dispatch(participantUpdated({
|
280
|
285
|
conference,
|
281
|
286
|
id: participantId,
|
|
@@ -383,7 +388,7 @@ function _maybePlaySounds({ getState, dispatch }, action) {
|
383
|
388
|
*/
|
384
|
389
|
function _participantJoinedOrUpdated(store, next, action) {
|
385
|
390
|
const { dispatch, getState } = store;
|
386
|
|
- const { participant: { avatarURL, e2eeEnabled, email, id, local, name, raisedHand } } = action;
|
|
391
|
+ const { participant: { avatarURL, email, id, local, name, raisedHand } } = action;
|
387
|
392
|
|
388
|
393
|
// Send an external update of the local participant's raised hand state
|
389
|
394
|
// if a new raised hand state is defined in the action.
|
|
@@ -398,16 +403,6 @@ function _participantJoinedOrUpdated(store, next, action) {
|
398
|
403
|
}
|
399
|
404
|
}
|
400
|
405
|
|
401
|
|
- // Send an external update of the local participant's E2EE enabled state
|
402
|
|
- // if a new state is defined in the action.
|
403
|
|
- if (typeof e2eeEnabled !== 'undefined') {
|
404
|
|
- if (local) {
|
405
|
|
- const { conference } = getState()['features/base/conference'];
|
406
|
|
-
|
407
|
|
- conference && conference.setLocalParticipantProperty('e2eeEnabled', e2eeEnabled);
|
408
|
|
- }
|
409
|
|
- }
|
410
|
|
-
|
411
|
406
|
// Allow the redux update to go through and compare the old avatar
|
412
|
407
|
// to the new avatar and emit out change events if necessary.
|
413
|
408
|
const result = next(action);
|