fix social-app ios patch feed
This commit is contained in:
30
ios/patching/032-social-app-ios-feed-loggedout.patch
Normal file
30
ios/patching/032-social-app-ios-feed-loggedout.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --git a/src/lib/api/feed/custom.ts b/src/lib/api/feed/custom.ts
|
||||
index 123456789..987654321 100644
|
||||
--- a/src/lib/api/feed/custom.ts
|
||||
+++ b/src/lib/api/feed/custom.ts
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
jsonStringToLex,
|
||||
} from '@atproto/api'
|
||||
|
||||
+import {PUBLIC_APPVIEW} from '#/lib/constants'
|
||||
import {
|
||||
getAppLanguageAsContentLanguage,
|
||||
getContentLanguages,
|
||||
@@ -119,7 +120,7 @@ async function loggedOutFetch({
|
||||
|
||||
// manually construct fetch call so we can add the `lang` cache-busting param
|
||||
let res = await fetch(
|
||||
- `https://api.bsky.app/xrpc/app.bsky.feed.getFeed?feed=${feed}${
|
||||
+ `${PUBLIC_APPVIEW}/xrpc/app.bsky.feed.getFeed?feed=${encodeURIComponent(feed)}${
|
||||
cursor ? `&cursor=${cursor}` : ''
|
||||
}&limit=${limit}&lang=${contentLangs}`,
|
||||
{
|
||||
@@ -139,7 +140,7 @@ async function loggedOutFetch({
|
||||
|
||||
// no data, try again with language headers removed
|
||||
res = await fetch(
|
||||
- `https://api.bsky.app/xrpc/app.bsky.feed.getFeed?feed=${feed}${
|
||||
+ `${PUBLIC_APPVIEW}/xrpc/app.bsky.feed.getFeed?feed=${encodeURIComponent(feed)}${
|
||||
cursor ? `&cursor=${cursor}` : ''
|
||||
}&limit=${limit}`,
|
||||
{method: 'GET', headers: {'Accept-Language': '', ...labelersHeader}},
|
||||
Reference in New Issue
Block a user