|
@@ -407,16 +407,20 @@ function _participantJoinedOrUpdated(store, next, action) {
|
407
|
407
|
// to the new avatar and emit out change events if necessary.
|
408
|
408
|
const result = next(action);
|
409
|
409
|
|
410
|
|
- const { disableThirdPartyRequests } = getState()['features/base/config'];
|
411
|
|
-
|
412
|
|
- if (!disableThirdPartyRequests && (avatarURL || email || id || name)) {
|
413
|
|
- const participantId = !id && local ? getLocalParticipant(getState()).id : id;
|
414
|
|
- const updatedParticipant = getParticipantById(getState(), participantId);
|
415
|
|
-
|
416
|
|
- getFirstLoadableAvatarUrl(updatedParticipant, store)
|
417
|
|
- .then(url => {
|
418
|
|
- dispatch(setLoadableAvatarUrl(participantId, url));
|
419
|
|
- });
|
|
410
|
+ // Only run this if the config is populated, otherwise we preload external resources
|
|
411
|
+ // even if disableThirdPartyRequests is set to true in config
|
|
412
|
+ if (Object.keys(getState()['features/base/config']).length) {
|
|
413
|
+ const { disableThirdPartyRequests } = getState()['features/base/config'];
|
|
414
|
+
|
|
415
|
+ if (!disableThirdPartyRequests && (avatarURL || email || id || name)) {
|
|
416
|
+ const participantId = !id && local ? getLocalParticipant(getState()).id : id;
|
|
417
|
+ const updatedParticipant = getParticipantById(getState(), participantId);
|
|
418
|
+
|
|
419
|
+ getFirstLoadableAvatarUrl(updatedParticipant, store)
|
|
420
|
+ .then(url => {
|
|
421
|
+ dispatch(setLoadableAvatarUrl(participantId, url));
|
|
422
|
+ });
|
|
423
|
+ }
|
420
|
424
|
}
|
421
|
425
|
|
422
|
426
|
// Notify external listeners of potential avatarURL changes.
|