Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client

fix: ensure com.atproto.* calls go through without proxying #35

merged opened by mary.my.id targeting main

atproto-proxy behavior seems ambiguous right now, it's not really clear whether PDS implementors should interpret atproto-proxy before or after PDS' own route handlers. This PR ensures that com.atproto.* calls go through without a proxy set (with some exception)

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:ia76kvnndjutgedggx2ibrem/sh.tangled.repo.pull/3mbn7dkbqhm22
+15 -14
Interdiff #0 #1
src/ageAssurance/data.tsx

This file has not been changed.

src/components/live/queries.ts

This file has not been changed.

src/lib/api/index.ts

This file has not been changed.

src/lib/generate-starterpack.ts

This file has not been changed.

src/screens/Onboarding/util.ts

This file has not been changed.

src/state/queries/list.ts

This file has not been changed.

src/state/queries/messages/actor-declaration.ts

This file has not been changed.

src/state/queries/postgate/index.ts

This file has not been changed.

src/state/queries/preferences/index.ts

This patch was likely rebased, as context lines do not match.

src/state/queries/starter-packs.ts

This file has not been changed.

src/state/queries/threadgate/index.ts

This file has not been changed.

+13 -13
src/state/session/agent.ts
··· 234 }), 235 getAge(birthDate) < 18 && 236 networkRetry(3, () => { 237 - return pdsAgent(agent).com.atproto.repo.putRecord({ 238 repo: account.did, 239 collection: 'chat.bsky.actor.declaration', 240 rkey: 'self', ··· 242 }), 243 getAge(birthDate) < 18 && 244 networkRetry(3, () => { 245 - return agent.com.atproto.repo.putRecord({ 246 repo: account.did, 247 collection: 'chat.bsky.actor.declaration', 248 rkey: 'self', ··· 439 } 440 } 441 442 - /** 443 - * Returns an agent configured to make requests directly to the user's PDS 444 - * without the appview proxy header. Use this for com.atproto.* methods and 445 - * other PDS-specific operations like preferences. 446 - */ 447 - export function pdsAgent<T extends BaseAgent>(agent: T): T { 448 - const clone = agent.clone() as T 449 - clone.configureProxy(null) 450 - return clone 451 - } 452 - 453 export type {BskyAppAgent} 454 455 ··· 468 469 470 } 471 } 472 473 export type {BskyAppAgent}
··· 234 }), 235 getAge(birthDate) < 18 && 236 networkRetry(3, () => { 237 + return agent.com.atproto.repo.putRecord({ 238 repo: account.did, 239 collection: 'chat.bsky.actor.declaration', 240 rkey: 'self', ··· 242 }), 243 getAge(birthDate) < 18 && 244 networkRetry(3, () => { 245 + return pdsAgent(agent).com.atproto.repo.putRecord({ 246 repo: account.did, 247 collection: 'chat.bsky.actor.declaration', 248 rkey: 'self', ··· 439 } 440 } 441 442 export type {BskyAppAgent} 443 444 ··· 457 458 459 } 460 + } 461 + 462 + /** 463 + * Returns an agent configured to make requests directly to the user's PDS 464 + * without the appview proxy header. Use this for com.atproto.* methods and 465 + * other PDS-specific operations like preferences. 466 + */ 467 + export function pdsAgent<T extends BaseAgent>(agent: T): T { 468 + const clone = agent.clone() as T 469 + clone.configureProxy(null) 470 + return clone 471 } 472 473 export type {BskyAppAgent}
src/state/session/index.tsx

This patch was likely rebased, as context lines do not match.

src/ageAssurance/useBeginAgeAssurance.ts

This file has not been changed.

src/components/dialogs/EmailDialog/data/useConfirmEmail.ts

This file has not been changed.

src/components/dialogs/EmailDialog/data/useManageEmail2FA.ts

This file has not been changed.

src/components/dialogs/EmailDialog/data/useRequestEmailUpdate.ts

This file has not been changed.

src/components/dialogs/EmailDialog/data/useRequestEmailVerification.ts

This file has not been changed.

src/components/dialogs/EmailDialog/data/useUpdateEmail.ts

This file has not been changed.

src/components/intents/VerifyEmailIntentDialog.tsx

This file has not been changed.

src/screens/Deactivated.tsx

This file has not been changed.

src/screens/Settings/components/ChangePasswordDialog.tsx

This file has not been changed.

src/screens/Settings/components/DeactivateAccountDialog.tsx

This file has not been changed.

src/screens/Settings/components/DisableEmail2FADialog.tsx

This file has not been changed.

src/screens/Settings/components/ExportCarDialog.tsx

This file has not been changed.

src/screens/SignupQueued.tsx

This file has not been changed.

src/state/queries/app-passwords.ts

This file has not been changed.

src/view/com/modals/DeleteAccount.tsx

This patch was likely rebased, as context lines do not match.

+2 -1
src/lib/media/video/upload.shared.ts
··· 3 import {msg} from '@lingui/macro' 4 5 import {VIDEO_SERVICE_DID} from '#/lib/constants' 6 import {UploadLimitError} from '#/lib/media/video/errors' 7 import {getServiceAuthAudFromUrl} from '#/lib/strings/url-helpers' 8 import {createVideoAgent} from './util' ··· 22 if (!pdsAud) { 23 throw new Error('Agent does not have a PDS URL') 24 } 25 - const {data: serviceAuth} = await agent.com.atproto.server.getServiceAuth({ 26 aud: aud ?? pdsAud, 27 lxm, 28 exp,
··· 3 import {msg} from '@lingui/macro' 4 5 import {VIDEO_SERVICE_DID} from '#/lib/constants' 6 + import {pdsAgent} from '#/state/session/agent' 7 import {UploadLimitError} from '#/lib/media/video/errors' 8 import {getServiceAuthAudFromUrl} from '#/lib/strings/url-helpers' 9 import {createVideoAgent} from './util' ··· 23 if (!pdsAud) { 24 throw new Error('Agent does not have a PDS URL') 25 } 26 + const {data: serviceAuth} = await pdsAgent(agent).com.atproto.server.getServiceAuth({ 27 aud: aud ?? pdsAud, 28 lxm, 29 exp,

History

2 rounds 0 comments
sign up or login to add to the discussion
expand 0 comments
pull request successfully merged
2 commits
expand
05c9641d
fix
7630dcd5
fix
expand 0 comments