Browse Source

e2ee: show warning if not all participants support E2EE

Refs: https://github.com/jitsi/lib-jitsi-meet/pull/1108
master
Saúl Ibarra Corretgé 5 years ago
parent
commit
e2788e0fb2

+ 1
- 0
lang/main.json View File

178
         "e2eeDescription": "<p>End-to-End Encryption is currently <strong>EXPERIMENTAL</strong>. Please see <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a> for details.</p><br/><p>Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: recording, live streaming and phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.</p>",
178
         "e2eeDescription": "<p>End-to-End Encryption is currently <strong>EXPERIMENTAL</strong>. Please see <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a> for details.</p><br/><p>Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: recording, live streaming and phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.</p>",
179
         "e2eeLabel": "Key",
179
         "e2eeLabel": "Key",
180
         "e2eeTitle": "End-to-End Encryption",
180
         "e2eeTitle": "End-to-End Encryption",
181
+        "e2eeWarning": "<br /><p><strong>WARNING:</strong> Not all participants in this meeting seem to have support for End-to-End encryption. If you enable it they won't be able to see nor hear you.</p>",
181
         "enterDisplayName": "Please enter your name here",
182
         "enterDisplayName": "Please enter your name here",
182
         "error": "Error",
183
         "error": "Error",
183
         "externalInstallationMsg": "You need to install our desktop sharing extension.",
184
         "externalInstallationMsg": "You need to install our desktop sharing extension.",

+ 7
- 0
react/features/base/participants/middleware.js View File

196
                 JitsiConferenceEvents.PARTICIPANT_PROPERTY_CHANGED,
196
                 JitsiConferenceEvents.PARTICIPANT_PROPERTY_CHANGED,
197
                 (participant, propertyName, oldValue, newValue) => {
197
                 (participant, propertyName, oldValue, newValue) => {
198
                     switch (propertyName) {
198
                     switch (propertyName) {
199
+                    case 'features_e2ee':
200
+                        store.dispatch(participantUpdated({
201
+                            conference,
202
+                            id: participant.getId(),
203
+                            e2eeSupported: newValue
204
+                        }));
205
+                        break;
199
                     case 'features_jigasi':
206
                     case 'features_jigasi':
200
                         store.dispatch(participantUpdated({
207
                         store.dispatch(participantUpdated({
201
                             conference,
208
                             conference,

+ 15
- 1
react/features/e2ee/components/E2EEDialog.js View File

7
 import { createE2EEEvent, sendAnalytics } from '../../analytics';
7
 import { createE2EEEvent, sendAnalytics } from '../../analytics';
8
 import { Dialog } from '../../base/dialog';
8
 import { Dialog } from '../../base/dialog';
9
 import { translate, translateToHTML } from '../../base/i18n';
9
 import { translate, translateToHTML } from '../../base/i18n';
10
+import { getParticipants } from '../../base/participants';
10
 import { connect } from '../../base/redux';
11
 import { connect } from '../../base/redux';
11
 
12
 
12
 import { setE2EEKey } from '../actions';
13
 import { setE2EEKey } from '../actions';
14
 
15
 
15
 type Props = {
16
 type Props = {
16
 
17
 
18
+    /**
19
+     * Indicates whether all participants in the conference currently support E2EE.
20
+     */
21
+    _everyoneSupportsE2EE: boolean,
22
+
17
     /**
23
     /**
18
      * The current E2EE key.
24
      * The current E2EE key.
19
      */
25
      */
70
      * @returns {ReactElement}
76
      * @returns {ReactElement}
71
      */
77
      */
72
     render() {
78
     render() {
73
-        const { t } = this.props;
79
+        const { _everyoneSupportsE2EE, t } = this.props;
74
 
80
 
75
         return (
81
         return (
76
             <Dialog
82
             <Dialog
81
                 <div className = 'e2ee-destription'>
87
                 <div className = 'e2ee-destription'>
82
                     { translateToHTML(t, 'dialog.e2eeDescription') }
88
                     { translateToHTML(t, 'dialog.e2eeDescription') }
83
                 </div>
89
                 </div>
90
+                {
91
+                    !_everyoneSupportsE2EE
92
+                        && <div className = 'e2ee-warn'>
93
+                            { translateToHTML(t, 'dialog.e2eeWarning') }
94
+                        </div>
95
+                }
84
                 <TextField
96
                 <TextField
85
                     autoFocus = { true }
97
                     autoFocus = { true }
86
                     compact = { true }
98
                     compact = { true }
133
  */
145
  */
134
 function mapStateToProps(state) {
146
 function mapStateToProps(state) {
135
     const { e2eeKey } = state['features/e2ee'];
147
     const { e2eeKey } = state['features/e2ee'];
148
+    const participants = getParticipants(state).filter(p => !p.local);
136
 
149
 
137
     return {
150
     return {
151
+        _everyoneSupportsE2EE: participants.every(p => Boolean(p.e2eeSupported)),
138
         _key: e2eeKey || ''
152
         _key: e2eeKey || ''
139
     };
153
     };
140
 }
154
 }

Loading…
Cancel
Save