Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3363313
D12455.id41387.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12455.id41387.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D12455: [lib] broadcast device list updates after Tunnelbroker socket connection is established
Attached
Detach File
Event Timeline
Log In to Comment