Live video on the AT Protocol
79
fork

Configure Feed

Select the types of activity you want to include in your feed.

oauth: recover session when connection recovers

Eli Mallon a7902a03 abc48051

+13 -2
+10
js/app/features/bluesky/blueskyProvider.tsx
··· 7 7 loadOAuthClient, 8 8 oauthCallback, 9 9 oauthError, 10 + selectIsReady, 10 11 selectOAuthSession, 11 12 selectUserProfile, 12 13 } from "./blueskySlice"; ··· 17 18 children: React.ReactNode; 18 19 }) { 19 20 const dispatch = useAppDispatch(); 21 + const isReady = useAppSelector(selectIsReady); 20 22 useEffect(() => { 21 23 dispatch(loadOAuthClient()); 22 24 }, []); 25 + useEffect(() => { 26 + if (!isReady) { 27 + const handle = setInterval(() => { 28 + dispatch(loadOAuthClient()); 29 + }, 5000); 30 + return () => clearInterval(handle); 31 + } 32 + }, [isReady]); 23 33 const oauthSession = useAppSelector(selectOAuthSession); 24 34 const userProfile = useAppSelector(selectUserProfile); 25 35 const wallet = useWallet();
+2 -1
js/app/features/bluesky/blueskySlice.tsx
··· 37 37 isMention, 38 38 } from "@atproto/api/dist/client/types/app/bsky/richtext/facet"; 39 39 import { OAuthSession } from "@atproto/oauth-client"; 40 + import error from "components/error/error"; 40 41 41 42 const initialState: BlueskyState = { 42 43 status: "start", ··· 191 192 rejected: (state, { error }) => { 192 193 return { 193 194 ...state, 194 - status: "loggedOut", 195 + // status: "loggedOut", 195 196 }; 196 197 }, 197 198 },
+1 -1
js/app/features/streamplace/streamplaceSlice.tsx
··· 245 245 }; 246 246 }, 247 247 rejected: (state, err) => { 248 - console.error("pollSegments rejected", err); 248 + // console.error("pollSegments rejected", err); 249 249 return { 250 250 ...state, 251 251 recentSegments: {