Page MenuHomePhabricator

D12455.id41387.diff
No OneTemporary

D12455.id41387.diff

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
@@ -8,6 +8,7 @@
} from '../actions/user-actions.js';
import { useGetAndUpdateDeviceListsForUsers } from '../hooks/peer-list-hooks.js';
import { usersWithMissingDeviceListSelector } from '../selectors/user-selectors.js';
+import { useTunnelbroker } from '../tunnelbroker/tunnelbroker-context.js';
import { getMessageForException } from '../utils/errors.js';
import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
@@ -71,10 +72,12 @@
usersWithMissingDeviceListSelector,
);
const getAndUpdateDeviceListsForUsers = useGetAndUpdateDeviceListsForUsers();
+ const { socketState } = useTunnelbroker();
React.useEffect(() => {
if (
!usingCommServicesAccessToken ||
- usersWithMissingDeviceList.length === 0
+ usersWithMissingDeviceList.length === 0 ||
+ !socketState.isAuthorized
) {
return;
}
@@ -89,7 +92,11 @@
);
}
})();
- }, [getAndUpdateDeviceListsForUsers, usersWithMissingDeviceList]);
+ }, [
+ socketState.isAuthorized,
+ getAndUpdateDeviceListsForUsers,
+ usersWithMissingDeviceList,
+ ]);
}
export { UserInfosHandler };

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 1:39 AM (22 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2581908
Default Alt Text
D12455.id41387.diff (1 KB)

Event Timeline