Bluesky app fork with some witchin' additions 💫

fix(mobile): OPENING WITCHSKY.APP LINKS now works!!!

should I add support for deer.social links? what about catsky.social? hmm so many possibilities (STILL NEEDS DEEP LINKING 💥)

xan.lol c3f2f2c9 b247469e

verified
+15 -8
+6
__tests__/lib/strings/url-helpers.test.ts
··· 159 159 ['https://www.bsky.app', true], 160 160 ['https://www.bsky.app/', true], 161 161 ['https://docs.bsky.app', true], 162 + ['https://witchsky.app', true], 163 + ['https://witchsky.app/', true], 164 + ['https://witchsky.app/profile/bob.test', true], 165 + ['https://www.witchsky.app', true], 166 + ['https://docs.witchsky.app', true], 162 167 ['https://bsky.social', true], 163 168 ['https://bsky.social/blog', true], 164 169 ['https://blueskyweb.xyz', true], 165 170 ['https://blueskyweb.zendesk.com', true], 166 171 ['http://bsky.app', true], 172 + ['http://bsky.app/', true], 167 173 ['http://bsky.social', true], 168 174 ['http://blueskyweb.xyz', true], 169 175 ['http://blueskyweb.zendesk.com', true],
+1
app.config.js
··· 19 19 20 20 const ASSOCIATED_DOMAINS = [ 21 21 'applinks:witchsky.app', 22 + 'applinks:bsky.app', 22 23 // When testing local services, enter an ngrok (et al) domain here. It must use a standard HTTP/HTTPS port. 23 24 ...(IS_DEV || IS_TESTFLIGHT ? [] : []), 24 25 ]
+3 -3
src/Navigation.tsx
··· 843 843 844 844 const LINKING = { 845 845 // TODO figure out what we are going to use 846 - // note: `bluesky://` is what is used in app.config.js 847 - prefixes: ['bsky://', 'bluesky://', 'https://bsky.app'], 846 + // note: `bluesky://` and `witchsky://` is what is used in app.config.js 847 + prefixes: ['bsky://', 'bluesky://', 'witchsky://', 'https://bsky.app', 'https://witchsky.app'], 848 848 849 849 getPathFromState(state: State) { 850 850 // find the current node in the navigation tree ··· 1144 1144 1145 1145 if (IS_WEB) { 1146 1146 const referrerInfo = Referrer.getReferrerInfo() 1147 - if (referrerInfo && referrerInfo.hostname !== 'bsky.app') { 1147 + if (referrerInfo && referrerInfo.hostname !== 'bsky.app' && referrerInfo.hostname !== 'witchsky.app') { 1148 1148 logEvent('deepLink:referrerReceived', { 1149 1149 to: window.location.href, 1150 1150 referrer: referrerInfo?.referrer,
+5 -5
src/lib/strings/url-helpers.ts
··· 10 10 export const BSKY_APP_HOST = 'https://witchsky.app' 11 11 const BSKY_TRUSTED_HOSTS = [ 12 12 'witchsky\\.app', 13 - 'witchsky\\.app', 13 + 'witchsky\\.social', 14 14 'bsky\\.app', 15 15 'bsky\\.social', 16 16 'blueskyweb\\.xyz', ··· 105 105 106 106 export function isBskyAppUrl(url: string): boolean { 107 107 return ( 108 + (url.startsWith('https://witchsky.app/') && 109 + !url.startsWith('https://witchsky.app/about')) || 108 110 url.startsWith('https://bsky.app/') || 109 111 (url.startsWith('https://deer.social/') && 110 - !url.startsWith('https://deer.social/about')) || 111 - (url.startsWith('https://witchsky.app/') && 112 - !url.startsWith('https://witchsky.app/about')) 112 + !url.startsWith('https://deer.social/about')) 113 113 ) 114 114 } 115 115 ··· 119 119 120 120 export function isBskyRSSUrl(url: string): boolean { 121 121 return ( 122 - (url.startsWith('https://bsky.app/') || isRelativeUrl(url)) && 122 + (isBskyAppUrl(url) || isRelativeUrl(url)) && 123 123 /\/rss\/?$/.test(url) 124 124 ) 125 125 }