Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

[APP-1960] Fix current session refresh bug (#10019)

authored by

Eric Bailey and committed by
GitHub
60a0edbb 562bf3be

+6 -13
-13
src/state/session/agent.ts
··· 72 72 await networkRetry(1, () => agent.resumeSession(prevSession)) 73 73 } else { 74 74 agent.sessionManager.session = prevSession 75 - if (!storedAccount.signupQueued) { 76 - networkRetry(3, () => agent.resumeSession(prevSession)).catch( 77 - (e: any) => { 78 - logger.error(`networkRetry failed to resume session`, { 79 - status: e?.status || 'unknown', 80 - // this field name is ignored by Sentry scrubbers 81 - safeMessage: e?.message || 'unknown', 82 - }) 83 - 84 - throw e 85 - }, 86 - ) 87 - } 88 75 } 89 76 90 77 // after session is attached
+6
src/state/session/index.tsx
··· 321 321 ) 322 322 if (syncedAccount && syncedAccount.refreshJwt) { 323 323 if (syncedAccount.did !== state.currentAgentState.did) { 324 + /* 325 + * Web handling: if leader tab has switched to a diff account that is 326 + * stale, it will refresh the session before triggering the update to 327 + * follower tabs. Follower tabs will therefore receive the fresh 328 + * session. See APP-1960, or ask Eric. 329 + */ 324 330 resumeSession(syncedAccount) 325 331 } else { 326 332 const agent = state.currentAgentState.agent as BskyAgent