add ios social-app
This commit is contained in:
209
ios/patching/002-social-app-ios-lib.patch
Normal file
209
ios/patching/002-social-app-ios-lib.patch
Normal file
@@ -0,0 +1,209 @@
|
||||
diff --git a/src/lib/api/feed/home.ts b/src/lib/api/feed/home.ts
|
||||
index 7a0d72d91..93554dc3e 100644
|
||||
--- a/src/lib/api/feed/home.ts
|
||||
+++ b/src/lib/api/feed/home.ts
|
||||
@@ -45,7 +45,7 @@ export class HomeFeedAPI implements FeedAPI {
|
||||
this.following = new FollowingFeedAPI({agent})
|
||||
this.discover = new CustomFeedAPI({
|
||||
agent,
|
||||
- feedParams: {feed: PROD_DEFAULT_FEED('whats-hot')},
|
||||
+ feedParams: {feed: PROD_DEFAULT_FEED('app')},
|
||||
})
|
||||
this.userInterests = userInterests
|
||||
}
|
||||
@@ -54,7 +54,7 @@ export class HomeFeedAPI implements FeedAPI {
|
||||
this.following = new FollowingFeedAPI({agent: this.agent})
|
||||
this.discover = new CustomFeedAPI({
|
||||
agent: this.agent,
|
||||
- feedParams: {feed: PROD_DEFAULT_FEED('whats-hot')},
|
||||
+ feedParams: {feed: PROD_DEFAULT_FEED('app')},
|
||||
userInterests: this.userInterests,
|
||||
})
|
||||
this.usingDiscover = false
|
||||
diff --git a/src/lib/constants.ts b/src/lib/constants.ts
|
||||
index 231447b4f..a44b3da05 100644
|
||||
--- a/src/lib/constants.ts
|
||||
+++ b/src/lib/constants.ts
|
||||
@@ -7,12 +7,12 @@ import {BLUESKY_PROXY_DID, CHAT_PROXY_DID} from '#/env'
|
||||
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 BSKY_SERVICE = 'https://syu.is'
|
||||
+export const BSKY_SERVICE_DID = 'did:web:syu.is'
|
||||
+export const PUBLIC_BSKY_SERVICE = 'https://bsky.syu.is'
|
||||
export const DEFAULT_SERVICE = BSKY_SERVICE
|
||||
-const HELP_DESK_LANG = 'en-us'
|
||||
-export const HELP_DESK_URL = `https://blueskyweb.zendesk.com/hc/${HELP_DESK_LANG}`
|
||||
+const HELP_DESK_LANG = 'ja-jp'
|
||||
+export const HELP_DESK_URL = 'https://syu.is/about/support/help'
|
||||
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'
|
||||
@@ -79,19 +79,17 @@ export function IS_PROD_SERVICE(url?: string) {
|
||||
}
|
||||
|
||||
export const PROD_DEFAULT_FEED = (rkey: string) =>
|
||||
- `at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/${rkey}`
|
||||
+ `at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/${rkey}`
|
||||
|
||||
export const STAGING_DEFAULT_FEED = (rkey: string) =>
|
||||
`at://did:plc:yofh3kx63drvfljkibw5zuxo/app.bsky.feed.generator/${rkey}`
|
||||
|
||||
export const PROD_FEEDS = [
|
||||
- `feedgen|${PROD_DEFAULT_FEED('whats-hot')}`,
|
||||
- `feedgen|${PROD_DEFAULT_FEED('thevids')}`,
|
||||
+ `feedgen|${PROD_DEFAULT_FEED('app')}`,
|
||||
]
|
||||
|
||||
export const STAGING_FEEDS = [
|
||||
- `feedgen|${STAGING_DEFAULT_FEED('whats-hot')}`,
|
||||
- `feedgen|${STAGING_DEFAULT_FEED('thevids')}`,
|
||||
+ `feedgen|${STAGING_DEFAULT_FEED('app')}`,
|
||||
]
|
||||
|
||||
export const POST_IMG_MAX = {
|
||||
@@ -129,7 +127,7 @@ export const LANG_DROPDOWN_HITSLOP = {top: 10, bottom: 10, left: 4, right: 4}
|
||||
export const BACK_HITSLOP = HITSLOP_30
|
||||
export const MAX_POST_LINES = 25
|
||||
|
||||
-export const BSKY_APP_ACCOUNT_DID = 'did:plc:z72i7hdynmk6r22z27h6tvur'
|
||||
+export const BSKY_APP_ACCOUNT_DID = 'did:plc:6qyecktefllvenje24fcxnie'
|
||||
|
||||
export const BSKY_FEED_OWNER_DIDS = [
|
||||
BSKY_APP_ACCOUNT_DID,
|
||||
@@ -138,9 +136,9 @@ export const BSKY_FEED_OWNER_DIDS = [
|
||||
]
|
||||
|
||||
export const DISCOVER_FEED_URI =
|
||||
- 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot'
|
||||
+ 'at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/app'
|
||||
export const VIDEO_FEED_URI =
|
||||
- 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/thevids'
|
||||
+ 'at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/app'
|
||||
export const STAGING_VIDEO_FEED_URI =
|
||||
'at://did:plc:yofh3kx63drvfljkibw5zuxo/app.bsky.feed.generator/thevids'
|
||||
export const VIDEO_FEED_URIS = [VIDEO_FEED_URI, STAGING_VIDEO_FEED_URI]
|
||||
@@ -209,8 +207,8 @@ export const urls = {
|
||||
},
|
||||
}
|
||||
|
||||
-export const PUBLIC_APPVIEW = 'https://api.bsky.app'
|
||||
-export const PUBLIC_APPVIEW_DID = 'did:web:api.bsky.app'
|
||||
+export const PUBLIC_APPVIEW = 'https://bsky.syu.is'
|
||||
+export const PUBLIC_APPVIEW_DID = 'did:web:bsky.syu.is'
|
||||
export const PUBLIC_STAGING_APPVIEW_DID = 'did:web:api.staging.bsky.dev'
|
||||
|
||||
export const DEV_ENV_APPVIEW = `http://localhost:2584` // always the same
|
||||
@@ -236,8 +234,8 @@ export const BLUESKY_MOD_SERVICE_HEADERS = {
|
||||
}
|
||||
|
||||
export const webLinks = {
|
||||
- tos: `https://bsky.social/about/support/tos`,
|
||||
- privacy: `https://bsky.social/about/support/privacy-policy`,
|
||||
+ tos: `https://syu.is/about/support/tos`,
|
||||
+ privacy: `https://syu.is/about/support/privacy-policy`,
|
||||
community: `https://bsky.social/about/support/community-guidelines`,
|
||||
communityDeprecated: `https://bsky.social/about/support/community-guidelines-deprecated`,
|
||||
}
|
||||
diff --git a/src/lib/demo.ts b/src/lib/demo.ts
|
||||
index 5ead62c9d..7c80dfe15 100644
|
||||
--- a/src/lib/demo.ts
|
||||
+++ b/src/lib/demo.ts
|
||||
@@ -1,7 +1,7 @@
|
||||
import {type AppBskyFeedGetFeed} from '@atproto/api'
|
||||
import {subDays, subMinutes} from 'date-fns'
|
||||
|
||||
-const DID = `did:plc:z72i7hdynmk6r22z27h6tvur`
|
||||
+const DID = `did:plc:6qyecktefllvenje24fcxnie`
|
||||
const NOW = new Date()
|
||||
const POST_1_DATE = subMinutes(NOW, 2).toISOString()
|
||||
const POST_2_DATE = subMinutes(NOW, 4).toISOString()
|
||||
diff --git a/src/lib/strings/url-helpers.ts b/src/lib/strings/url-helpers.ts
|
||||
index 6088e2806..0f6787a4d 100644
|
||||
--- a/src/lib/strings/url-helpers.ts
|
||||
+++ b/src/lib/strings/url-helpers.ts
|
||||
@@ -338,7 +338,7 @@ export function createProxiedUrl(url: string): string {
|
||||
return url
|
||||
}
|
||||
|
||||
- return `https://go.bsky.app/redirect?u=${encodeURIComponent(url)}`
|
||||
+ return url
|
||||
}
|
||||
|
||||
export function isShortLink(url: string): boolean {
|
||||
diff --git a/src/state/queries/feed.ts b/src/state/queries/feed.ts
|
||||
index de1e92533..3d1566800 100644
|
||||
--- a/src/state/queries/feed.ts
|
||||
+++ b/src/state/queries/feed.ts
|
||||
@@ -201,14 +201,7 @@ export function useFeedSourceInfoQuery({uri}: {uri: string}) {
|
||||
// for the ones we know need it
|
||||
// -prf
|
||||
export const KNOWN_AUTHED_ONLY_FEEDS = [
|
||||
- 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/with-friends', // popular with friends, by bsky.app
|
||||
- 'at://did:plc:tenurhgjptubkk5zf5qhi3og/app.bsky.feed.generator/mutuals', // mutuals, by skyfeed
|
||||
- 'at://did:plc:tenurhgjptubkk5zf5qhi3og/app.bsky.feed.generator/only-posts', // only posts, by skyfeed
|
||||
- 'at://did:plc:wzsilnxf24ehtmmc3gssy5bu/app.bsky.feed.generator/mentions', // mentions, by flicknow
|
||||
- 'at://did:plc:q6gjnaw2blty4crticxkmujt/app.bsky.feed.generator/bangers', // my bangers, by jaz
|
||||
- 'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/mutuals', // mutuals, by bluesky
|
||||
- 'at://did:plc:q6gjnaw2blty4crticxkmujt/app.bsky.feed.generator/my-followers', // followers, by jaz
|
||||
- 'at://did:plc:vpkhqolt662uhesyj6nxm7ys/app.bsky.feed.generator/followpics', // the gram, by why
|
||||
+ 'at://did:plc:6qyecktefllvenje24fcxnie/app.bsky.feed.generator/app', // app feed, by syu.is
|
||||
]
|
||||
|
||||
type GetPopularFeedsOptions = {limit?: number; enabled?: boolean}
|
||||
diff --git a/src/state/queries/preferences/index.ts b/src/state/queries/preferences/index.ts
|
||||
index 0cf6ab546..399e592bc 100644
|
||||
--- a/src/state/queries/preferences/index.ts
|
||||
+++ b/src/state/queries/preferences/index.ts
|
||||
@@ -270,7 +270,7 @@ export function useReplaceForYouWithDiscoverFeedMutation() {
|
||||
await agent.addSavedFeeds([
|
||||
{
|
||||
type: 'feed',
|
||||
- value: PROD_DEFAULT_FEED('whats-hot'),
|
||||
+ value: PROD_DEFAULT_FEED('app'),
|
||||
pinned: true,
|
||||
},
|
||||
])
|
||||
diff --git a/src/view/com/posts/FeedShutdownMsg.tsx b/src/view/com/posts/FeedShutdownMsg.tsx
|
||||
index 620382175..928480da2 100644
|
||||
--- a/src/view/com/posts/FeedShutdownMsg.tsx
|
||||
+++ b/src/view/com/posts/FeedShutdownMsg.tsx
|
||||
@@ -32,7 +32,7 @@ export function FeedShutdownMsg({feedUri}: {feedUri: string}) {
|
||||
f => f.value === feedUri && f.pinned,
|
||||
)
|
||||
const discoverFeedConfig = preferences?.savedFeeds?.find(
|
||||
- f => f.value === PROD_DEFAULT_FEED('whats-hot'),
|
||||
+ f => f.value === PROD_DEFAULT_FEED('app'),
|
||||
)
|
||||
const hasFeedPinned = Boolean(feedConfig)
|
||||
const hasDiscoverPinned = Boolean(discoverFeedConfig?.pinned)
|
||||
@@ -44,7 +44,7 @@ export function FeedShutdownMsg({feedUri}: {feedUri: string}) {
|
||||
Toast.show(_(msg`Removed from your feeds`))
|
||||
}
|
||||
if (hasDiscoverPinned) {
|
||||
- setSelectedFeed(`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`)
|
||||
+ setSelectedFeed(`feedgen|${PROD_DEFAULT_FEED('app')}`)
|
||||
}
|
||||
} catch (err: any) {
|
||||
Toast.show(
|
||||
@@ -63,7 +63,7 @@ export function FeedShutdownMsg({feedUri}: {feedUri: string}) {
|
||||
forYouFeedConfig: feedConfig,
|
||||
discoverFeedConfig,
|
||||
})
|
||||
- setSelectedFeed(`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`)
|
||||
+ setSelectedFeed(`feedgen|${PROD_DEFAULT_FEED('app')}`)
|
||||
Toast.show(_(msg`The feed has been replaced with Discover.`))
|
||||
} catch (err: any) {
|
||||
Toast.show(
|
||||
@@ -100,7 +100,7 @@ export function FeedShutdownMsg({feedUri}: {feedUri: string}) {
|
||||
This feed is no longer online. We are showing{' '}
|
||||
<InlineLinkText
|
||||
label={_(msg`The Discover feed`)}
|
||||
- to="/profile/bsky.app/feed/whats-hot"
|
||||
+ to="/profile/did:plc:6qyecktefllvenje24fcxnie/feed/app"
|
||||
style={[a.text_md]}>
|
||||
Discover
|
||||
</InlineLinkText>{' '}
|
||||
Reference in New Issue
Block a user