Changeset View
Changeset View
Standalone View
Standalone View
keyserver/src/socket/session-utils.js
Show First 20 Lines • Show All 565 Lines • ▼ Show 20 Lines | if (!shouldCheckUserInfos) { | ||||
} | } | ||||
const userInfos = []; | const userInfos = []; | ||||
if (userIDs.size > 0) { | if (userIDs.size > 0) { | ||||
const fetchedUserInfos = await fetchUserInfos([...userIDs]); | const fetchedUserInfos = await fetchUserInfos([...userIDs]); | ||||
for (const userID in fetchedUserInfos) { | for (const userID in fetchedUserInfos) { | ||||
const userInfo = fetchedUserInfos[userID]; | const userInfo = fetchedUserInfos[userID]; | ||||
if (userInfo && userInfo.username) { | if (userInfo && userInfo.username) { | ||||
const { id, username, avatar } = userInfo; | const { id, username } = userInfo; | ||||
userInfos.push({ id, username, avatar }); | userInfos.push({ id, username }); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
if (userInfos.length > 0) { | if (userInfos.length > 0) { | ||||
stateChanges.userInfos = userInfos; | stateChanges.userInfos = userInfos; | ||||
} | } | ||||
} | } | ||||
const checkStateRequest = { | const checkStateRequest = { | ||||
Show All 18 Lines |