diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-05-25 21:17:11 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-05-25 21:17:11 -0500 |
commit | 7b6948e6171b448e271f0564efd1f186ccadb9b8 (patch) | |
tree | e0d1b6e9f9c863cbff53f8832fd55d03cb670a83 /src/lib/constants.ts | |
parent | 15c1b6ee157471807a723161066ba4ce5e12c0b5 (diff) | |
parent | e832352e9844002408b45291396a3c495be23276 (diff) | |
download | voidsky-7b6948e6171b448e271f0564efd1f186ccadb9b8.tar.zst |
Merge branch 'custom-algos' into main
Diffstat (limited to 'src/lib/constants.ts')
-rw-r--r-- | src/lib/constants.ts | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 6d0d4797b..41aab1431 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -94,6 +94,49 @@ export function SUGGESTED_FOLLOWS(serviceUrl: string) { } } +export const STAGING_DEFAULT_FEED = (rkey: string) => + `at://did:plc:wqzurwm3kmaig6e6hnc2gqwo/app.bsky.feed.generator/${rkey}` +export const PROD_DEFAULT_FEED = (rkey: string) => + `at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/${rkey}` +export async function DEFAULT_FEEDS( + serviceUrl: string, + resolveHandle: (name: string) => Promise<string>, +) { + if (serviceUrl.includes('localhost')) { + // local dev + const aliceDid = await resolveHandle('alice.test') + return { + pinned: [`at://${aliceDid}/app.bsky.feed.generator/alice-favs`], + saved: [`at://${aliceDid}/app.bsky.feed.generator/alice-favs`], + } + } else if (serviceUrl.includes('staging')) { + // staging + return { + pinned: [STAGING_DEFAULT_FEED('whats-hot')], + saved: [ + STAGING_DEFAULT_FEED('bsky-team'), + STAGING_DEFAULT_FEED('with-friends'), + STAGING_DEFAULT_FEED('whats-hot'), + STAGING_DEFAULT_FEED('hot-classic'), + ], + } + } else { + // production + return { + pinned: [ + PROD_DEFAULT_FEED('whats-hot'), + PROD_DEFAULT_FEED('with-friends'), + ], + saved: [ + PROD_DEFAULT_FEED('bsky-team'), + PROD_DEFAULT_FEED('with-friends'), + PROD_DEFAULT_FEED('whats-hot'), + PROD_DEFAULT_FEED('hot-classic'), + ], + } + } +} + export const POST_IMG_MAX = { width: 2000, height: 2000, |