diff --git a/lib/shared/farcaster/farcaster-hooks.js b/lib/shared/farcaster/farcaster-hooks.js --- a/lib/shared/farcaster/farcaster-hooks.js +++ b/lib/shared/farcaster/farcaster-hooks.js @@ -37,6 +37,7 @@ import { useGetCommFCUsersForFIDs } from '../../hooks/user-identities-hooks.js'; import type { GetCommFCUsersForFIDs } from '../../hooks/user-identities-hooks.js'; import { isLoggedIn } from '../../selectors/user-selectors.js'; +import { useTunnelbroker } from '../../tunnelbroker/tunnelbroker-context.js'; import type { RawMessageInfo } from '../../types/message-types.js'; import { messageTruncationStatus, @@ -1413,11 +1414,17 @@ const currentUserSupportsDCs = useCurrentUserSupportsDCs(); const farcasterDCsLoaded = useFarcasterDCsLoaded(); const lightweightSync = useLightweightFarcasterConversationsSync(); + const { socketState } = useTunnelbroker(); const started = React.useRef(false); React.useEffect(() => { // We're waiting for the state to be ready - if (started.current || !fullyLoggedIn || !currentUserSupportsDCs) { + if ( + started.current || + !fullyLoggedIn || + !currentUserSupportsDCs || + !socketState.isAuthorized + ) { return; } started.current = true; @@ -1433,6 +1440,7 @@ farcasterDCsLoaded, fullyLoggedIn, lightweightSync, + socketState.isAuthorized, ]); }