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

fix age assurance screen always appearing #37

merged opened by daniela.lol targeting main from daniela.lol/witchsky.app: main

pull request https://tangled.org/jollywhoppers.com/witchsky.app/pulls/35 removed "proxying" from random parts of the social apps code. this already sounded like a bad idea to me, as the proxying could be there for a genuinely good reason. seems like this confirms it, as removing the proxying completely breaks the age assurance system and causes the screen to appear each time.

this pull request reverts the changes made by the pull request specifically for the age assurance code, i am unsure if that pull request broke anything else, only time will tell, at least this functions again.

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:x3vdwseoxbzbp2dfv7q3brqn/sh.tangled.repo.pull/3mcnrx7q6b722
+2 -4
Diff #0
+1 -2
src/ageAssurance/data.tsx
··· 20 20 snoozeBirthdateUpdateAllowedForDid, 21 21 } from '#/state/birthdate' 22 22 import {useAgent, useSession} from '#/state/session' 23 - import {pdsAgent} from '#/state/session/agent' 24 23 import * as debug from '#/ageAssurance/debug' 25 24 import {logger} from '#/ageAssurance/logger' 26 25 import { ··· 337 336 agent: AtpAgent 338 337 }): Promise<OtherRequiredData> { 339 338 if (debug.enabled) return debug.resolve(debug.otherRequiredData) 340 - const [prefs] = await Promise.all([pdsAgent(agent).getPreferences()]) 339 + const [prefs] = await Promise.all([agent.getPreferences()]) 341 340 const data: OtherRequiredData = { 342 341 birthdate: prefs.birthDate ? prefs.birthDate.toISOString() : undefined, 343 342 }
+1 -2
src/ageAssurance/useBeginAgeAssurance.ts
··· 10 10 } from '#/lib/constants' 11 11 import {isNetworkError} from '#/lib/hooks/useCleanError' 12 12 import {useAgent} from '#/state/session' 13 - import {pdsAgent} from '#/state/session/agent' 14 13 import {usePatchAgeAssuranceServerState} from '#/ageAssurance' 15 14 import {logger} from '#/ageAssurance/logger' 16 15 import {BLUESKY_PROXY_DID} from '#/env' ··· 39 38 40 39 const { 41 40 data: {token}, 42 - } = await pdsAgent(agent).com.atproto.server.getServiceAuth({ 41 + } = await agent.com.atproto.server.getServiceAuth({ 43 42 aud: BLUESKY_PROXY_DID, 44 43 lxm: `app.bsky.ageassurance.begin`, 45 44 })

History

1 round 0 comments
sign up or login to add to the discussion
daniela.lol submitted #0
1 commit
expand
revert "pdsAgent" change from age assurance
expand 0 comments
pull request successfully merged