Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32156352
D15437.1765035888.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15437.1765035888.diff
View Options
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,
]);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 3:44 PM (20 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5839329
Default Alt Text
D15437.1765035888.diff (1 KB)
Attached To
Mode
D15437: [lib] wait with lightweight sync for Tunnelbroker connection
Attached
Detach File
Event Timeline
Log In to Comment