Update profile.js

This commit is contained in:
2025-05-07 18:00:32 +05:00
committed by GitHub
parent 6c77b10e33
commit 8166aeb58d

View File

@@ -18,14 +18,17 @@ async function getProfileFromAnixart(profileId, token = '') {
const verifiedResponse = await axios.get('https://anixart.seele.su/api/is_verified');
const verifiedList = verifiedResponse.data;
if (Array.isArray(verifiedList) && verifiedList.includes(profileId.toString())) {
const alreadyVerified = !!profileData.profile.is_verified;
if (!alreadyVerified && Array.isArray(verifiedList) && verifiedList.includes(profileId.toString())) {
profileData.profile.is_verified = true;
} else {
}
// Если уже верифицирован — не затираем
} catch {
// Если профиль уже верифицирован — оставляем, иначе false
if (typeof profileData.profile.is_verified !== 'boolean') {
profileData.profile.is_verified = false;
}
} catch {
// Ошибку верификации игнорируем
profileData.profile.is_verified = false;
}
// Подгружаем кастомные роли