@xuda.io/ai_module 1.1.4776 → 1.1.4778
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +13 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -7036,8 +7036,19 @@ export const get_profile_picture = async function (uid, account_type = 'business
|
|
|
7036
7036
|
// debugger;
|
|
7037
7037
|
try {
|
|
7038
7038
|
url = await getUserPhotoByEmail(email);
|
|
7039
|
-
|
|
7040
|
-
|
|
7039
|
+
if (url) {
|
|
7040
|
+
try {
|
|
7041
|
+
image_blob_ret = await get_image_blob_from_downloaded_image(url);
|
|
7042
|
+
profile_picture_source = 'google';
|
|
7043
|
+
} catch (err) {
|
|
7044
|
+
if (!err.message.includes('Failed to fetch image URL')) {
|
|
7045
|
+
console.error(err);
|
|
7046
|
+
return '';
|
|
7047
|
+
}
|
|
7048
|
+
profile_picture_source = 'factual';
|
|
7049
|
+
factual_image_mode = true;
|
|
7050
|
+
}
|
|
7051
|
+
} else {
|
|
7041
7052
|
// first attempt
|
|
7042
7053
|
if (account_type === 'business') {
|
|
7043
7054
|
url = await get_url();
|