avatars: ensure no remote avatar is loaded when disableThirdPartyRequests is set

pull/5469/head jitsi-meet_4341
Saúl Ibarra Corretgé 5 years ago committed by Saúl Ibarra Corretgé
parent 4fd5dc0ee0
commit ed8009883b
  1. 4
      react/features/base/participants/middleware.js
  2. 6
      react/features/base/participants/preloadImage.web.js

@ -343,7 +343,9 @@ function _participantJoinedOrUpdated({ dispatch, getState }, next, action) {
// to the new avatar and emit out change events if necessary.
const result = next(action);
if (avatarURL || email || id || name) {
const { disableThirdPartyRequests } = getState()['features/base/config'];
if (!disableThirdPartyRequests && (avatarURL || email || id || name)) {
const participantId = !id && local ? getLocalParticipant(getState()).id : id;
const updatedParticipant = getParticipantById(getState(), participantId);

@ -3,8 +3,6 @@
import { isIconUrl } from './functions';
declare var config: Object;
/**
* Tries to preload an image.
*
@ -16,10 +14,6 @@ export function preloadImage(src: string | Object): Promise<string> {
return Promise.resolve(src);
}
if (typeof config === 'object' && config.disableThirdPartyRequests) {
return Promise.reject();
}
return new Promise((resolve, reject) => {
const image = document.createElement('img');

Loading…
Cancel
Save