From 09e304eda70670bb091c35631c3d77be6bae09bb Mon Sep 17 00:00:00 2001 From: Daniela Henkel Date: Wed, 17 Dec 2025 12:32:41 +0100 Subject: [PATCH] hacky geolocation moments --- config.txt | 1 - justfile | 3 --- src/geolocation/const.ts | 8 ++++++-- src/state/geolocation/const.ts | 30 ------------------------------ 4 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 config.txt delete mode 100644 src/state/geolocation/const.ts diff --git a/config.txt b/config.txt deleted file mode 100644 index 36fa585ff..000000000 --- a/config.txt +++ /dev/null @@ -1 +0,0 @@ -{"countryCode":"US","regionCode":"CA","ageRestrictedGeos":[],"ageBlockedGeos":[]} diff --git a/justfile b/justfile index 17678f15f..4a1a13c9a 100644 --- a/justfile +++ b/justfile @@ -44,9 +44,6 @@ postbuild-web: # copy our static pages over! cp -r witchsky-static-about web-build/about - # temporarily copy over out bootleg config.txt to simulate geolocation - cp config.txt web-build/ - [group('dev')] dev-android-setup: prebuild-android yarn android diff --git a/src/geolocation/const.ts b/src/geolocation/const.ts index b12f37140..aa7508c9b 100644 --- a/src/geolocation/const.ts +++ b/src/geolocation/const.ts @@ -6,7 +6,11 @@ export const GEOLOCATION_SERVICE_URL = `${BAPP_CONFIG_URL}/geolocation` /** * Default geolocation config. */ +// forks tend to get blocked from the geolocation service bluesky uses, +// instead of making our own and grabbing peoples location without their consent, +// lets just force set everyone to be in the US, +// maybe make a tweak in the future that lets ppl customize this export const FALLBACK_GEOLOCATION_SERVICE_RESPONSE: Geolocation = { - countryCode: undefined, - regionCode: undefined, + countryCode: 'US', + regionCode: 'CA', } diff --git a/src/state/geolocation/const.ts b/src/state/geolocation/const.ts deleted file mode 100644 index 916ac999f..000000000 --- a/src/state/geolocation/const.ts +++ /dev/null @@ -1,30 +0,0 @@ -import {type GeolocationStatus} from '#/state/geolocation/types' -import {BAPP_CONFIG_DEV_URL, IS_DEV} from '#/env' -import {type Device} from '#/storage' - -export const IPCC_URL = `https://bsky.app/ipcc` -export const BAPP_CONFIG_URL_PROD = `/config.txt` -export const BAPP_CONFIG_URL = IS_DEV - ? (BAPP_CONFIG_DEV_URL ?? BAPP_CONFIG_URL_PROD) - : BAPP_CONFIG_URL_PROD -export const GEOLOCATION_CONFIG_URL = BAPP_CONFIG_URL - -/** - * Default geolocation config. - */ -export const DEFAULT_GEOLOCATION_CONFIG: Device['geolocation'] = { - countryCode: 'US', - regionCode: 'CA', - ageRestrictedGeos: [], - ageBlockedGeos: [], -} - -/** - * Default geolocation status. - */ -export const DEFAULT_GEOLOCATION_STATUS: GeolocationStatus = { - countryCode: 'US', - regionCode: 'CA', - isAgeRestrictedGeo: false, - isAgeBlockedGeo: false, -} -- 2.43.0