Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(invite/add-people-dialog): isCorsAvatarURL update (#15959)
Calinteodor3c27f154906a
diff --git a/react/features/base/avatar/functions.ts b/react/features/base/avatar/functions.tsindex 52121815b0..030b8066e7 100644--- a/react/features/base/avatar/functions.ts+++ b/react/features/base/avatar/functions.ts@@ -72,11 +72,15 @@ export function getInitials(s?: string) {/*** Checks if the passed URL should be loaded with CORS.*- * @param {string} url - The URL.+ * @param {string | Function} url - The URL (on mobile we use a specific Icon component for avatars).* @param {Array<string>} corsURLs - The URL pattern that matches a URL that needs to be handled with CORS.- * @returns {void}+ * @returns {boolean}*/-export function isCORSAvatarURL(url: string, corsURLs: Array<string> = []): boolean {+export function isCORSAvatarURL(url: string | Function, corsURLs: Array<string> = []): boolean {+ if (typeof url === 'function') {+ return false;+ }+return corsURLs.some(pattern => url.startsWith(pattern));}diff --git a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.tsx b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.tsxindex 4e8e22f8cc..60d2bcae4a 100644--- a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.tsx+++ b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.tsx@@ -249,6 +249,8 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<IProps, IState> {const { item } = flatListItem;switch (item.type) {++ // isCORSAvatarURL in this case is falsecase INVITE_TYPES.PHONE:return {avatar: IconPhoneRinging,