SHA256
Отключить мультиаккаунтность и уточнить статусы профиля
This commit is contained in:
@@ -22,9 +22,6 @@ export const pageMeta = {
|
||||
},
|
||||
};
|
||||
|
||||
const GENDER_MALE = 'male';
|
||||
const GENDER_FEMALE = 'female';
|
||||
const GENDER_UNKNOWN = 'unknown';
|
||||
|
||||
function normalizeLogin(value) {
|
||||
return String(value || '').trim();
|
||||
@@ -64,13 +61,6 @@ function escapeHtml(text) {
|
||||
.replaceAll("'", ''');
|
||||
}
|
||||
|
||||
function normalizeGender(value) {
|
||||
const clean = String(value || '').trim().toLowerCase();
|
||||
if (clean === GENDER_MALE) return GENDER_MALE;
|
||||
if (clean === GENDER_FEMALE) return GENDER_FEMALE;
|
||||
return GENDER_UNKNOWN;
|
||||
}
|
||||
|
||||
function toSet(list) {
|
||||
return new Set(uniqueLogins(list).map((value) => normKey(value)));
|
||||
}
|
||||
@@ -117,24 +107,6 @@ function normalizeAvatar(row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function applyRelativeGender(map, rows) {
|
||||
(Array.isArray(rows) ? rows : []).forEach((row) => {
|
||||
const login = normalizeLogin(row?.login);
|
||||
if (!login) return;
|
||||
const key = normKey(login);
|
||||
const gender = normalizeGender(row?.gender);
|
||||
const prev = map.get(key) || GENDER_UNKNOWN;
|
||||
if (prev === GENDER_UNKNOWN || gender !== GENDER_UNKNOWN) map.set(key, gender);
|
||||
});
|
||||
}
|
||||
|
||||
function getRelativeGenderMap(graph) {
|
||||
const map = new Map();
|
||||
// Родственные связи пока скрыты из UI, хотя сервер продолжает хранить их коды.
|
||||
void graph;
|
||||
return map;
|
||||
}
|
||||
|
||||
function buildGraphModel(graph, centerLogin) {
|
||||
const login = normalizeLogin(graph?.login || centerLogin || state.session.login);
|
||||
const outFriends = toSet(graph?.outFriends);
|
||||
@@ -156,7 +128,6 @@ function buildGraphModel(graph, centerLogin) {
|
||||
role: 'friend',
|
||||
relationType: hasLogin(outCloseFriends, targetLogin) ? 'close_friend' : 'friend',
|
||||
isRelative: false,
|
||||
gender: GENDER_UNKNOWN,
|
||||
forward: true,
|
||||
backward: hasLogin(inCloseFriends, targetLogin) || hasLogin(inFriends, targetLogin),
|
||||
mark: allMarks.get(normKey(targetLogin)) || null,
|
||||
|
||||
Reference in New Issue
Block a user