diff --git a/src/api/gramjs/methods/users.ts b/src/api/gramjs/methods/users.ts index 16582265d..dfb9b524e 100644 --- a/src/api/gramjs/methods/users.ts +++ b/src/api/gramjs/methods/users.ts @@ -67,6 +67,7 @@ export async function fetchFullUser({ const fullInfo = buildApiUserFullInfo(result); const users = result.users.map(buildApiUser).filter(Boolean); + const userStatusesById = buildApiUserStatuses(result.users); const chats = result.chats.map((c) => buildApiChatFromPreview(c)).filter(Boolean); const user = users.find(({ id: userId }) => userId === id)!; @@ -83,6 +84,7 @@ export async function fetchFullUser({ fullInfo, users, chats, + userStatusesById, }; } diff --git a/src/global/actions/api/users.ts b/src/global/actions/api/users.ts index 23ad78241..40ea3e357 100644 --- a/src/global/actions/api/users.ts +++ b/src/global/actions/api/users.ts @@ -74,6 +74,7 @@ addActionHandler('loadFullUser', async (global, actions, payload): Promise global = updateUserFullInfo(global, userId, result.fullInfo); global = updateUsers(global, buildCollectionByKey(result.users, 'id')); global = updateChats(global, buildCollectionByKey(result.chats, 'id')); + global = addUserStatuses(global, result.userStatusesById); setGlobal(global); if (withPhotos || (profilePhotos?.count && hasChangedPhoto)) {