diff --git a/README.md b/README.md index 286a6b5e6..eaa1ad595 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Welcome friends! This is the codebase for the Catsky Social app. Get the app itself: -- **Web: bsky.app** +- **Web: social.shatteredsky.net** {segment.text} diff --git a/bskyembed/src/screens/landing.tsx b/bskyembed/src/screens/landing.tsx index ad1217c88..9652219f1 100644 --- a/bskyembed/src/screens/landing.tsx +++ b/bskyembed/src/screens/landing.tsx @@ -18,7 +18,7 @@ import * as bsky from '../types/bsky' import {niceDate} from '../util/nice-date' const DEFAULT_POST = - 'https://bsky.app/profile/did:plc:vjug55kidv6sye7ykr5faxxn/post/3jzn6g7ixgq2y' + 'https://social.shatteredsky.net/profile/did:plc:vjug55kidv6sye7ykr5faxxn/post/3jzn6g7ixgq2y' const DEFAULT_URI = 'at://did:plc:vjug55kidv6sye7ykr5faxxn/app.bsky.feed.post/3jzn6g7ixgq2y' @@ -59,7 +59,7 @@ function LandingPage() { } else { try { const urlp = new URL(uri) - if (!urlp.hostname.endsWith('bsky.app')) { + if (!urlp.hostname.endsWith('shatteredsky.net')) { throw new Error('Invalid hostname') } const split = urlp.pathname.slice(1).split('/') diff --git a/bskyembed/src/screens/post.tsx b/bskyembed/src/screens/post.tsx index 76ac032ae..5165e87ab 100644 --- a/bskyembed/src/screens/post.tsx +++ b/bskyembed/src/screens/post.tsx @@ -90,9 +90,9 @@ function PwiOptOut({thread}: {thread: AppBskyFeedDefs.ThreadViewPost}) { function ErrorMessage() { return ( - + diff --git a/bskylink/src/config.ts b/bskylink/src/config.ts index 795a7210f..1c32f54b8 100644 --- a/bskylink/src/config.ts +++ b/bskylink/src/config.ts @@ -74,7 +74,7 @@ export const envToCfg = (env: Environment): Config => { version: env.version, hostnames: env.hostnames, hostnamesSet: new Set(env.hostnames), - appHostname: env.appHostname ?? 'bsky.app', + appHostname: env.appHostname ?? 'social.shatteredsky.net', safelinkEnabled: env.safelinkEnabled ?? false, safelinkPdsUrl: env.safelinkPdsUrl, safelinkAgentIdentifier: env.safelinkAgentIdentifier, diff --git a/bskylink/src/html/linkWarningContents.ts b/bskylink/src/html/linkWarningContents.ts index 31449c3c8..a85d6563f 100644 --- a/bskylink/src/html/linkWarningContents.ts +++ b/bskylink/src/html/linkWarningContents.ts @@ -38,7 +38,7 @@ export function linkWarningContents(
${continueButton} - ${req.__('Return to Bluesky')} + ${req.__('Return to Shattered Sky')}
` } diff --git a/bskyweb/cmd/bskyweb/main.go b/bskyweb/cmd/bskyweb/main.go index e4f982fae..39a37c333 100644 --- a/bskyweb/cmd/bskyweb/main.go +++ b/bskyweb/cmd/bskyweb/main.go @@ -84,7 +84,7 @@ func run(args []string) { Name: "cors-allowed-origins", Usage: "list of allowed origins for CORS requests", Required: false, - Value: cli.NewStringSlice("https://bsky.app", "https://main.bsky.dev", "https://app.staging.bsky.dev"), + Value: cli.NewStringSlice("https://bsky.app", "https://main.bsky.dev", "https://app.staging.bsky.dev", "https://social.shatteredsky.net"), EnvVars: []string{"CORS_ALLOWED_ORIGINS"}, }, &cli.StringFlag{ diff --git a/bskyweb/cmd/embedr/handlers.go b/bskyweb/cmd/embedr/handlers.go index 15e57a411..1903a9599 100644 --- a/bskyweb/cmd/embedr/handlers.go +++ b/bskyweb/cmd/embedr/handlers.go @@ -78,12 +78,12 @@ func (srv *Server) parseBlueskyURL(ctx context.Context, raw string) (*syntax.ATU if err != nil { return nil, err } - if u.Hostname() != "bsky.app" { - return nil, fmt.Errorf("only bsky.app URLs currently supported") + if u.Hostname() != "social.shatteredsky.net" { + return nil, fmt.Errorf("only social.shatteredsky.net URLs currently supported") } pathParts := strings.Split(u.Path, "/") // NOTE: pathParts[0] will be empty string if len(pathParts) != 5 || pathParts[1] != "profile" || pathParts[3] != "post" { - return nil, fmt.Errorf("only bsky.app post URLs currently supported") + return nil, fmt.Errorf("only social.shatteredsky.net post URLs currently supported") } atid, err := syntax.ParseAtIdentifier(pathParts[2]) if err != nil { @@ -142,7 +142,7 @@ func (srv *Server) WebOEmbed(c echo.Context) error { aturi, err := srv.parseBlueskyURL(c.Request().Context(), c.QueryParam("url")) if err != nil { - return c.String(http.StatusBadRequest, fmt.Sprintf("Expected 'url' to be bsky.app URL or AT-URI: %v", err)) + return c.String(http.StatusBadRequest, fmt.Sprintf("Expected 'url' to be social.shatteredsky.net URL or AT-URI: %v", err)) } if aturi.Collection() != syntax.NSID("app.bsky.feed.post") { return c.String(http.StatusNotImplemented, "Only posts (app.bsky.feed.post records) can be embedded currently") @@ -169,9 +169,9 @@ func (srv *Server) WebOEmbed(c echo.Context) error { Type: "rich", Version: "1.0", AuthorName: "@" + post.Author.Handle, - AuthorURL: fmt.Sprintf("https://bsky.app/profile/%s", post.Author.Handle), - ProviderName: "Bluesky Social", - ProviderURL: "https://bsky.app", + AuthorURL: fmt.Sprintf("https://social.shatteredsky.net/profile/%s", post.Author.Handle), + ProviderName: "Shattered Sky", + ProviderURL: "https://social.shatteredsky.net", CacheAge: 86400, Width: &width, Height: nil, diff --git a/bskyweb/cmd/embedr/snippet.go b/bskyweb/cmd/embedr/snippet.go index b93acb2cd..dda6dc13d 100644 --- a/bskyweb/cmd/embedr/snippet.go +++ b/bskyweb/cmd/embedr/snippet.go @@ -64,8 +64,8 @@ func (srv *Server) postEmbedHTML(postView *appbsky.FeedDefs_PostView) (string, e PostText: post.Text, PostAuthor: authorName, PostIndexedAt: sortAt, - ProfileURL: template.URL(fmt.Sprintf("https://bsky.app/profile/%s?ref_src=embed", aturi.Authority())), - PostURL: template.URL(fmt.Sprintf("https://bsky.app/profile/%s/post/%s?ref_src=embed", aturi.Authority(), aturi.RecordKey())), + ProfileURL: template.URL(fmt.Sprintf("https://social.shatteredsky.net/profile/%s?ref_src=embed", aturi.Authority())), + PostURL: template.URL(fmt.Sprintf("https://social.shatteredsky.net/profile/%s/post/%s?ref_src=embed", aturi.Authority(), aturi.RecordKey())), WidgetURL: template.URL("https://embed.bsky.app/static/embed.js"), } diff --git a/bskyweb/templates/post.html b/bskyweb/templates/post.html index d939cffec..0666e5020 100644 --- a/bskyweb/templates/post.html +++ b/bskyweb/templates/post.html @@ -63,7 +63,7 @@ "author": { "@type": "Person", "name": "{{ postView.Author.DisplayName }}", - "url": "https://bsky.app/profile/{{ postView.Author.Handle }}" + "url": "https://social.shatteredsky.net/profile/{{ postView.Author.Handle }}" }, {%- if postText %} "text": "{{ postText }}", diff --git a/modules/BlueskyClip/ViewController.swift b/modules/BlueskyClip/ViewController.swift index ef17765a4..a1d88dd58 100644 --- a/modules/BlueskyClip/ViewController.swift +++ b/modules/BlueskyClip/ViewController.swift @@ -34,7 +34,7 @@ class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDele webView.navigationDelegate = self self.view.addSubview(webView) self.webView = webView - self.webView?.load(URLRequest(url: URL(string: "https://bsky.app/?splash=true&clip=true")!)) + self.webView?.load(URLRequest(url: URL(string: "https://social.shatteredsky.net/?splash=true&clip=true")!)) } func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { @@ -86,7 +86,7 @@ class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDele } switch host { - case "bsky.app": + case "social.shatteredsky.net": if url.pathComponents.count == 4, url.pathComponents[1] == "start" || url.pathComponents[1] == "starter-pack" { return true @@ -109,7 +109,7 @@ class ViewController: UIViewController, WKScriptMessageHandler, WKNavigationDele self.webView?.load(URLRequest(url: url)) } } else { - self.webView?.load(URLRequest(url: URL(string: "https://bsky.app/?splash=true&clip=true")!)) + self.webView?.load(URLRequest(url: URL(string: "https://social.shatteredsky.net/?splash=true&clip=true")!)) } } diff --git a/modules/expo-bluesky-swiss-army/src/Referrer/index.web.ts b/modules/expo-bluesky-swiss-army/src/Referrer/index.web.ts index cfd42642d..2044c6d6f 100644 --- a/modules/expo-bluesky-swiss-army/src/Referrer/index.web.ts +++ b/modules/expo-bluesky-swiss-army/src/Referrer/index.web.ts @@ -17,7 +17,7 @@ export function getReferrerInfo(): ReferrerInfo | null { ) { try { const url = new URL(document.referrer) - if (url.hostname !== 'bsky.app') { + if (url.hostname !== 'social.shatteredsky.net') { return { referrer: url.href, hostname: url.hostname, diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 522a591d8..7849e96bb 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -795,7 +795,7 @@ const FlatNavigator = () => { const LINKING = { // TODO figure out what we are going to use // note: `bluesky://` is what is used in app.config.js - prefixes: ['bsky://', 'bluesky://', 'https://bsky.app'], + prefixes: ['bsky://', 'bluesky://', 'https://social.shatteredsky.net'], getPathFromState(state: State) { // find the current node in the navigation tree @@ -1085,7 +1085,7 @@ function logModuleInitTime() { if (isWeb) { const referrerInfo = Referrer.getReferrerInfo() - if (referrerInfo && referrerInfo.hostname !== 'bsky.app') { + if (referrerInfo && referrerInfo.hostname !== 'social.shatteredsky.net') { logEvent('deepLink:referrerReceived', { to: window.location.href, referrer: referrerInfo?.referrer, diff --git a/src/lib/constants.ts b/src/lib/constants.ts index c997710f9..61949087b 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -14,7 +14,7 @@ export const DEFAULT_SERVICE = BSKY_SERVICE export const HELP_DESK_URL = `https://github.com/NekoDrone/catsky-social/issues/new/choose` export const EMBED_SERVICE = 'https://embed.bsky.app' export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js` -export const BSKY_DOWNLOAD_URL = 'https://bsky.app/download' +export const BSKY_DOWNLOAD_URL = 'https://social.shatteredsky.net/download' export const STARTER_PACK_MAX_SIZE = 150 // HACK diff --git a/src/lib/hooks/useIntentHandler.ts b/src/lib/hooks/useIntentHandler.ts index 0c8397008..6d489c1e5 100644 --- a/src/lib/hooks/useIntentHandler.ts +++ b/src/lib/hooks/useIntentHandler.ts @@ -34,7 +34,7 @@ export function useIntentHandler() { React.useEffect(() => { const handleIncomingURL = (url: string) => { const referrerInfo = Referrer.getReferrerInfo() - if (referrerInfo && referrerInfo.hostname !== 'bsky.app') { + if (referrerInfo && referrerInfo.hostname !== 'social.shatteredsky.net') { logger.metric('deepLink:referrerReceived', { to: url, referrer: referrerInfo?.referrer, diff --git a/src/lib/routes/links.ts b/src/lib/routes/links.ts index 908db7cba..cda0da13d 100644 --- a/src/lib/routes/links.ts +++ b/src/lib/routes/links.ts @@ -50,9 +50,9 @@ export function makeStarterPackLink( rkey?: string, ) { if (typeof starterPackOrName === 'string') { - return `https://bsky.app/start/${starterPackOrName}/${rkey}` + return `https://social.shatteredsky.net/start/${starterPackOrName}/${rkey}` } else { const uriRkey = new AtUri(starterPackOrName.uri).rkey - return `https://bsky.app/start/${starterPackOrName.creator.handle}/${uriRkey}` + return `https://social.shatteredsky.net/start/${starterPackOrName.creator.handle}/${uriRkey}` } } diff --git a/src/lib/strings/embed-player.ts b/src/lib/strings/embed-player.ts index a7ce441fc..acc8e7d16 100644 --- a/src/lib/strings/embed-player.ts +++ b/src/lib/strings/embed-player.ts @@ -9,10 +9,10 @@ const IFRAME_HOST = isWeb ? // @ts-ignore only for web window.location.host === 'localhost:8100' ? 'http://localhost:8100' - : 'https://bsky.app' + : 'https://social.shatteredsky.net' : __DEV__ && !process.env.JEST_WORKER_ID ? 'http://localhost:8100' - : 'https://bsky.app' + : 'https://social.shatteredsky.net' export const embedPlayerSources = [ 'youtube', diff --git a/src/lib/strings/url-helpers.ts b/src/lib/strings/url-helpers.ts index 86b052f3a..7f1f50ecd 100644 --- a/src/lib/strings/url-helpers.ts +++ b/src/lib/strings/url-helpers.ts @@ -7,8 +7,10 @@ import {isInvalidHandle} from '#/lib/strings/handles' import {startUriToStarterPackUri} from '#/lib/strings/starter-pack' import {logger} from '#/logger' -export const BSKY_APP_HOST = 'https://bsky.app' +export const BSKY_APP_HOST = 'https://social.shatteredsky.net' const BSKY_TRUSTED_HOSTS = [ + 'social\\.shatteredsky\\.net', + 'shatteredsky\\.net', 'bsky\\.app', 'bsky\\.social', 'blueskyweb\\.xyz', @@ -91,7 +93,10 @@ export function toBskyAppUrl(url: string): string { } export function isBskyAppUrl(url: string): boolean { - return url.startsWith('https://bsky.app/') + return ( + url.startsWith('https://bsky.app/') || + url.startsWith('https://social.shatteredsky.net/') + ) } export function isRelativeUrl(url: string): boolean { @@ -100,7 +105,9 @@ export function isRelativeUrl(url: string): boolean { export function isBskyRSSUrl(url: string): boolean { return ( - (url.startsWith('https://bsky.app/') || isRelativeUrl(url)) && + (url.startsWith('https://bsky.app/') || + url.startsWith('https://social.shatteredsky.net/') || + isRelativeUrl(url)) && /\/rss\/?$/.test(url) ) } diff --git a/src/screens/Moderation/index.tsx b/src/screens/Moderation/index.tsx index 983919c64..9b6207f81 100644 --- a/src/screens/Moderation/index.tsx +++ b/src/screens/Moderation/index.tsx @@ -423,11 +423,13 @@ export function ModerationScreenInner({ Adult content can only be enabled via the Web at{' '} { evt.preventDefault() - Linking.openURL('https://bsky.app/') + Linking.openURL( + 'https://social.shatteredsky.net/', + ) return false }}> bsky.app