Ver código fonte

fix(avatar) remove participant's "avatarID"

Through several avatar work iterations it's no longer used.
master
Saúl Ibarra Corretgé 5 anos atrás
pai
commit
c5f6df5210

+ 0
- 12
conference.js Ver arquivo

24
     reloadWithStoredParams
24
     reloadWithStoredParams
25
 } from './react/features/app/actions';
25
 } from './react/features/app/actions';
26
 import {
26
 import {
27
-    AVATAR_ID_COMMAND,
28
     AVATAR_URL_COMMAND,
27
     AVATAR_URL_COMMAND,
29
     EMAIL_COMMAND,
28
     EMAIL_COMMAND,
30
     authStatusChanged,
29
     authStatusChanged,
169
  * Known custom conference commands.
168
  * Known custom conference commands.
170
  */
169
  */
171
 const commands = {
170
 const commands = {
172
-    AVATAR_ID: AVATAR_ID_COMMAND,
173
     AVATAR_URL: AVATAR_URL_COMMAND,
171
     AVATAR_URL: AVATAR_URL_COMMAND,
174
     CUSTOM_ROLE: 'custom-role',
172
     CUSTOM_ROLE: 'custom-role',
175
     EMAIL: EMAIL_COMMAND,
173
     EMAIL: EMAIL_COMMAND,
2136
                     }));
2134
                     }));
2137
             });
2135
             });
2138
 
2136
 
2139
-        room.addCommandListener(this.commands.defaults.AVATAR_ID,
2140
-            (data, from) => {
2141
-                APP.store.dispatch(
2142
-                    participantUpdated({
2143
-                        conference: room,
2144
-                        id: from,
2145
-                        avatarID: data.value
2146
-                    }));
2147
-            });
2148
-
2149
         APP.UI.addListener(UIEvents.NICKNAME_CHANGED,
2137
         APP.UI.addListener(UIEvents.NICKNAME_CHANGED,
2150
             this.changeLocalDisplayName.bind(this));
2138
             this.changeLocalDisplayName.bind(this));
2151
 
2139
 

+ 0
- 8
react/features/base/conference/actions.js Ver arquivo

52
     SET_START_MUTED_POLICY
52
     SET_START_MUTED_POLICY
53
 } from './actionTypes';
53
 } from './actionTypes';
54
 import {
54
 import {
55
-    AVATAR_ID_COMMAND,
56
     AVATAR_URL_COMMAND,
55
     AVATAR_URL_COMMAND,
57
     EMAIL_COMMAND,
56
     EMAIL_COMMAND,
58
     JITSI_CONFERENCE_URL_KEY
57
     JITSI_CONFERENCE_URL_KEY
198
             botType
197
             botType
199
         })));
198
         })));
200
 
199
 
201
-    conference.addCommandListener(
202
-        AVATAR_ID_COMMAND,
203
-        (data, id) => dispatch(participantUpdated({
204
-            conference,
205
-            id,
206
-            avatarID: data.value
207
-        })));
208
     conference.addCommandListener(
200
     conference.addCommandListener(
209
         AVATAR_URL_COMMAND,
201
         AVATAR_URL_COMMAND,
210
         (data, id) => dispatch(participantUpdated({
202
         (data, id) => dispatch(participantUpdated({

+ 0
- 7
react/features/base/conference/constants.js Ver arquivo

1
-/**
2
- * The command type for updating a participant's avatar ID.
3
- *
4
- * @type {string}
5
- */
6
-export const AVATAR_ID_COMMAND = 'avatar-id';
7
-
8
 /**
1
 /**
9
  * The command type for updating a participant's avatar URL.
2
  * The command type for updating a participant's avatar URL.
10
  *
3
  *

+ 0
- 5
react/features/base/conference/functions.js Ver arquivo

14
 import { safeDecodeURIComponent } from '../util';
14
 import { safeDecodeURIComponent } from '../util';
15
 
15
 
16
 import {
16
 import {
17
-    AVATAR_ID_COMMAND,
18
     AVATAR_URL_COMMAND,
17
     AVATAR_URL_COMMAND,
19
     EMAIL_COMMAND,
18
     EMAIL_COMMAND,
20
     JITSI_CONFERENCE_URL_KEY
19
     JITSI_CONFERENCE_URL_KEY
316
             setDisplayName: Function,
315
             setDisplayName: Function,
317
             setLocalParticipantProperty: Function }) {
316
             setLocalParticipantProperty: Function }) {
318
     const {
317
     const {
319
-        avatarID,
320
         avatarURL,
318
         avatarURL,
321
         email,
319
         email,
322
         features,
320
         features,
323
         name
321
         name
324
     } = getLocalParticipant(stateful);
322
     } = getLocalParticipant(stateful);
325
 
323
 
326
-    avatarID && conference.sendCommand(AVATAR_ID_COMMAND, {
327
-        value: avatarID
328
-    });
329
     avatarURL && conference.sendCommand(AVATAR_URL_COMMAND, {
324
     avatarURL && conference.sendCommand(AVATAR_URL_COMMAND, {
330
         value: avatarURL
325
         value: avatarURL
331
     });
326
     });

+ 0
- 1
react/features/base/participants/middleware.js Ver arquivo

283
     const settings = getState()['features/base/settings'];
283
     const settings = getState()['features/base/settings'];
284
 
284
 
285
     dispatch(localParticipantJoined({
285
     dispatch(localParticipantJoined({
286
-        avatarID: settings.avatarID,
287
         avatarURL: settings.avatarURL,
286
         avatarURL: settings.avatarURL,
288
         email: settings.email,
287
         email: settings.email,
289
         name: settings.displayName
288
         name: settings.displayName

+ 0
- 2
react/features/base/participants/reducer.js Ver arquivo

181
  */
181
  */
182
 function _participantJoined({ participant }) {
182
 function _participantJoined({ participant }) {
183
     const {
183
     const {
184
-        avatarID,
185
         avatarURL,
184
         avatarURL,
186
         botType,
185
         botType,
187
         connectionStatus,
186
         connectionStatus,
211
     }
210
     }
212
 
211
 
213
     return {
212
     return {
214
-        avatarID,
215
         avatarURL,
213
         avatarURL,
216
         botType,
214
         botType,
217
         conference,
215
         conference,

+ 0
- 1
react/features/base/settings/actionTypes.js Ver arquivo

5
  *     type: SETTINGS_UPDATED,
5
  *     type: SETTINGS_UPDATED,
6
  *     settings: {
6
  *     settings: {
7
  *         audioOutputDeviceId: string,
7
  *         audioOutputDeviceId: string,
8
- *         avatarID: string,
9
  *         avatarURL: string,
8
  *         avatarURL: string,
10
  *         cameraDeviceId: string,
9
  *         cameraDeviceId: string,
11
  *         displayName: string,
10
  *         displayName: string,

+ 0
- 1
react/features/base/settings/actions.js Ver arquivo

8
  *     type: SETTINGS_UPDATED,
8
  *     type: SETTINGS_UPDATED,
9
  *     settings: {
9
  *     settings: {
10
  *         audioOutputDeviceId: string,
10
  *         audioOutputDeviceId: string,
11
- *         avatarID: string,
12
  *         avatarURL: string,
11
  *         avatarURL: string,
13
  *         cameraDeviceId: string,
12
  *         cameraDeviceId: string,
14
  *         displayName: string,
13
  *         displayName: string,

+ 1
- 11
react/features/base/settings/reducer.js Ver arquivo

1
 // @flow
1
 // @flow
2
 
2
 
3
 import { jitsiLocalStorage } from '@jitsi/js-utils';
3
 import { jitsiLocalStorage } from '@jitsi/js-utils';
4
-import { randomHexString } from '@jitsi/js-utils/random';
5
 import _ from 'lodash';
4
 import _ from 'lodash';
6
 
5
 
7
 import { APP_WILL_MOUNT } from '../app/actionTypes';
6
 import { APP_WILL_MOUNT } from '../app/actionTypes';
19
  */
18
  */
20
 const DEFAULT_STATE = {
19
 const DEFAULT_STATE = {
21
     audioOutputDeviceId: undefined,
20
     audioOutputDeviceId: undefined,
22
-    avatarID: undefined,
23
     avatarURL: undefined,
21
     avatarURL: undefined,
24
     cameraDeviceId: undefined,
22
     cameraDeviceId: undefined,
25
     disableCallIntegration: undefined,
23
     disableCallIntegration: undefined,
126
     // jibri, and remove the old settings.js values.
124
     // jibri, and remove the old settings.js values.
127
     const savedDisplayName = jitsiLocalStorage.getItem('displayname');
125
     const savedDisplayName = jitsiLocalStorage.getItem('displayname');
128
     const savedEmail = jitsiLocalStorage.getItem('email');
126
     const savedEmail = jitsiLocalStorage.getItem('email');
129
-    let avatarID = _.escape(jitsiLocalStorage.getItem('avatarId'));
130
 
127
 
131
     // The helper _.escape will convert null to an empty strings. The empty
128
     // The helper _.escape will convert null to an empty strings. The empty
132
     // string will be saved in settings. On app re-load, because an empty string
129
     // string will be saved in settings. On app re-load, because an empty string
133
     // is a defined value, it will override any value found in local storage.
130
     // is a defined value, it will override any value found in local storage.
134
     // The workaround is sidestepping _.escape when the value is not set in
131
     // The workaround is sidestepping _.escape when the value is not set in
135
     // local storage.
132
     // local storage.
136
-    const displayName
137
-        = savedDisplayName === null ? undefined : _.escape(savedDisplayName);
133
+    const displayName = savedDisplayName === null ? undefined : _.escape(savedDisplayName);
138
     const email = savedEmail === null ? undefined : _.escape(savedEmail);
134
     const email = savedEmail === null ? undefined : _.escape(savedEmail);
139
 
135
 
140
-    if (!avatarID) {
141
-        // if there is no avatar id, we generate a unique one and use it forever
142
-        avatarID = randomHexString(32);
143
-    }
144
-
145
     settings = assignIfDefined({
136
     settings = assignIfDefined({
146
-        avatarID,
147
         displayName,
137
         displayName,
148
         email
138
         email
149
     }, settings);
139
     }, settings);

Carregando…
Cancelar
Salvar