diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/constants.ts | 3 | ||||
-rw-r--r-- | src/lib/statsig/gates.ts | 1 | ||||
-rw-r--r-- | src/lib/strings/handles.ts | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/constants.ts b/src/lib/constants.ts index ab52b8710..21f0ab870 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -5,6 +5,7 @@ export const LOCAL_DEV_SERVICE = Platform.OS === 'android' ? 'http://10.0.2.2:2583' : 'http://localhost:2583' export const STAGING_SERVICE = 'https://staging.bsky.dev' export const BSKY_SERVICE = 'https://bsky.social' +export const BSKY_SERVICE_DID = 'did:web:bsky.social' export const PUBLIC_BSKY_SERVICE = 'https://public.api.bsky.app' export const DEFAULT_SERVICE = BSKY_SERVICE const HELP_DESK_LANG = 'en-us' @@ -31,7 +32,7 @@ export const DISCOVER_DEBUG_DIDS: Record<string, true> = { 'did:plc:3jpt2mvvsumj2r7eqk4gzzjz': true, // esb.lol 'did:plc:vjug55kidv6sye7ykr5faxxn': true, // emilyliu.me 'did:plc:tgqseeot47ymot4zro244fj3': true, // iwsmith.bsky.social - 'did:plc:2dzyut5lxna5ljiaasgeuffz': true, // mrnuma.bsky.social + 'did:plc:2dzyut5lxna5ljiaasgeuffz': true, // darrin.bsky.team } const BASE_FEEDBACK_FORM_URL = `${HELP_DESK_URL}/requests/new` diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts index c3bd1a7cb..66134a462 100644 --- a/src/lib/statsig/gates.ts +++ b/src/lib/statsig/gates.ts @@ -5,6 +5,7 @@ export type Gate = | 'debug_subscriptions' | 'disable_onboarding_policy_update_notice' | 'explore_show_suggested_feeds' + | 'handle_suggestions' | 'old_postonboarding' | 'onboarding_add_video_feed' | 'post_threads_v2_unspecced' diff --git a/src/lib/strings/handles.ts b/src/lib/strings/handles.ts index 78a2e1a09..02b9943d3 100644 --- a/src/lib/strings/handles.ts +++ b/src/lib/strings/handles.ts @@ -34,7 +34,8 @@ export function sanitizeHandle(handle: string, prefix = ''): string { export interface IsValidHandle { handleChars: boolean hyphenStartOrEnd: boolean - frontLength: boolean + frontLengthNotTooShort: boolean + frontLengthNotTooLong: boolean totalLength: boolean overall: boolean } @@ -50,7 +51,8 @@ export function validateServiceHandle( handleChars: !str || (VALIDATE_REGEX.test(fullHandle) && !str.includes('.')), hyphenStartOrEnd: !str.startsWith('-') && !str.endsWith('-'), - frontLength: str.length >= 3 && str.length <= MAX_SERVICE_HANDLE_LENGTH, + frontLengthNotTooShort: str.length >= 3, + frontLengthNotTooLong: str.length <= MAX_SERVICE_HANDLE_LENGTH, totalLength: fullHandle.length <= 253, } |