SHA256
Доделать профиль, связи и серверные миграции
This commit is contained in:
@@ -2905,6 +2905,18 @@ export class AuthService {
|
||||
return response.payload || {};
|
||||
}
|
||||
|
||||
async listUserProfileRelations(login, listType, limit = 100, offset = 0) {
|
||||
const response = await this.ws.request('ListUserProfileRelations', { login, listType, limit, offset });
|
||||
if (response.status !== 200) throw opError('ListUserProfileRelations', response);
|
||||
return response.payload || {};
|
||||
}
|
||||
|
||||
async listUserProfileChannels(login, mode, limit = 100, offset = 0) {
|
||||
const response = await this.ws.request('ListUserProfileChannels', { login, mode, limit, offset });
|
||||
if (response.status !== 200) throw opError('ListUserProfileChannels', response);
|
||||
return response.payload || {};
|
||||
}
|
||||
|
||||
async searchUsers(prefix, options = {}) {
|
||||
const payload = { prefix };
|
||||
if (typeof options?.isServer === 'boolean') {
|
||||
|
||||
@@ -262,6 +262,16 @@ export async function loadUserProfileCard(login) {
|
||||
// Compatibility aliases for older graph/card consumers; values come only from the new profile schema.
|
||||
official: String(snapshot?.accountRole || '').trim().toLowerCase() === 'primary',
|
||||
shine: String(snapshot?.shineStatus || '').trim().toLowerCase() === 'shining',
|
||||
stats: {
|
||||
ownedPublicChannelsCount: Number(user.ownedPublicChannelsCount || 0),
|
||||
followingChannelsCount: Number(user.followingChannelsCount || 0),
|
||||
friendsCount: Number(user.friendsCount || 0),
|
||||
closeFriendsCount: Number(user.closeFriendsCount || 0),
|
||||
primaryReceivedCount: Number(user.primaryConfirmationsReceivedCount || 0),
|
||||
primaryGivenCount: Number(user.primaryConfirmationsGivenCount || 0),
|
||||
shineReceivedCount: Number(user.shineConfirmationsReceivedCount || 0),
|
||||
shineGivenCount: Number(user.shineConfirmationsGivenCount || 0),
|
||||
},
|
||||
avatar: snapshot?.avatar?.txId
|
||||
? {
|
||||
ar: String(snapshot.avatar.txId).trim(),
|
||||
|
||||
Reference in New Issue
Block a user