diff --git a/lib/handlers/user-infos-handler.react.js b/lib/handlers/user-infos-handler.react.js --- a/lib/handlers/user-infos-handler.react.js +++ b/lib/handlers/user-infos-handler.react.js @@ -12,9 +12,13 @@ } from '../actions/user-actions.js'; import { useGetAndUpdateDeviceListsForUsers } from '../hooks/peer-list-hooks.js'; import { useLegacyAshoatKeyserverCall } from '../keyserver-conn/legacy-keyserver-call.js'; -import { usersWithMissingDeviceListSelector } from '../selectors/user-selectors.js'; +import { + usersWithMissingDeviceListSelector, + isLoggedInToKeyserver, +} from '../selectors/user-selectors.js'; import { useTunnelbroker } from '../tunnelbroker/tunnelbroker-context.js'; import { relationshipActions } from '../types/relationship-types.js'; +import { authoritativeKeyserverID } from '../utils/authoritative-keyserver.js'; import { getMessageForException } from '../utils/errors.js'; import { useDispatchActionPromise } from '../utils/redux-promise-utils.js'; import { useSelector } from '../utils/redux-utils.js'; @@ -43,7 +47,14 @@ const currentUserInfo = useSelector(state => state.currentUserInfo); + const loggedInToAuthKeyserver = useSelector( + isLoggedInToKeyserver(authoritativeKeyserverID()), + ); + React.useEffect(() => { + if (!loggedInToAuthKeyserver) { + return; + } const newUserIDs = Object.keys(userInfosWithMissingUsernames).filter( id => !requestedIDsRef.current.has(id), ); @@ -89,6 +100,7 @@ findUserIdentities, userInfos, userInfosWithMissingUsernames, + loggedInToAuthKeyserver, ]); const usersWithMissingDeviceList = useSelector(