add patch social-app
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
repos
|
||||
.claude
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
ATP_APPVIEW_HOST=https://bsky.${host}
|
||||
ATP_APPVIEW_HOST=https://public.api.bsky.app
|
||||
EXPO_PUBLIC_BLUESKY_PROXY_DID=did:web:api.bsky.app
|
||||
EXPO_PUBLIC_ENV=production
|
||||
|
||||
28
install.zsh
28
install.zsh
@@ -100,9 +100,8 @@ function at-repos-social-app-icon-origin() {
|
||||
curl -sL $icon -o $d/icons/Logotype.tsx
|
||||
}
|
||||
|
||||
function at-repos-social-app-write() {
|
||||
function at-repos-social-app-avatar-write() {
|
||||
did_admin=did:plc:6qyecktefllvenje24fcxnie
|
||||
|
||||
dt=$d/repos/social-app/src
|
||||
cd $dt
|
||||
grep -R syu.is .|cut -d : -f 1|sort -u|xargs sed -i "s/syu.is/${host}/g"
|
||||
@@ -123,7 +122,7 @@ function at-repos-social-app-write() {
|
||||
grep -R $did_admin .|cut -d : -f 1|sort -u|xargs sed -i "s/${did_admin}/${did}/g"
|
||||
}
|
||||
|
||||
function at-service-bsky-api-patch() {
|
||||
function at-repos-atproto-service-bsky-api-patch() {
|
||||
# https://github.com/itaru2622/bluesky-selfhost-env/blob/master/patching/105-atproto-services-for-docker.diff
|
||||
f=$d/repos/atproto/services/bsky/api.js
|
||||
curl -sL https://raw.githubusercontent.com/bluesky-social/atproto/refs/heads/main/services/bsky/api.js -o $f
|
||||
@@ -135,7 +134,7 @@ function at-service-bsky-api-patch() {
|
||||
popd
|
||||
}
|
||||
|
||||
function at-service-pds-index-patch() {
|
||||
function at-repos-atproto-service-pds-index-patch() {
|
||||
f=$d/repos/atproto/services/pds/index.js
|
||||
curl -sL https://raw.githubusercontent.com/bluesky-social/atproto/refs/heads/main/services/pds/index.js -o $f
|
||||
d_=$d/repos/atproto
|
||||
@@ -146,7 +145,17 @@ function at-service-pds-index-patch() {
|
||||
popd
|
||||
}
|
||||
|
||||
function at-repos-social-app-patch() {
|
||||
function at-repos-social-app-agent-patch() {
|
||||
f=$d/repos/social-app/src/state/session/agent.ts
|
||||
p_=$d/patching/8980-social-app-disable-proxy.diff
|
||||
d_=$d/repos/social-app
|
||||
echo "applying patch: under ${f} for ${p_}"
|
||||
pushd ${d_}
|
||||
patch -p1 < ${p_}
|
||||
popd
|
||||
}
|
||||
|
||||
function at-repos-social-app-docker-patch() {
|
||||
f=$d/repos/social-app/Dockerfile
|
||||
p_=$d/patching/social-app-dockerfile.diff
|
||||
d_=$d/repos/social-app
|
||||
@@ -218,10 +227,11 @@ at-repos-clone
|
||||
at-repos-pull
|
||||
at-repos-social-app-icon
|
||||
at-repos-social-app-icon-origin
|
||||
at-repos-social-app-write
|
||||
at-service-bsky-api-patch
|
||||
at-service-pds-index-patch
|
||||
at-repos-social-app-patch
|
||||
at-repos-social-app-avatar-write
|
||||
at-repos-atproto-service-bsky-api-patch
|
||||
at-repos-atproto-service-pds-index-patch
|
||||
at-repos-social-app-docker-patch
|
||||
at-repos-social-app-agent-patch
|
||||
at-repos-ozone-patch
|
||||
at-repos-docker
|
||||
# at-regi-docker
|
||||
|
||||
44
patching/8980-social-app-disable-proxy.diff
Normal file
44
patching/8980-social-app-disable-proxy.diff
Normal file
@@ -0,0 +1,44 @@
|
||||
diff --git a/src/state/session/agent.ts b/src/state/session/agent.ts
|
||||
index 36d19299b..ba095436a 100644
|
||||
--- a/src/state/session/agent.ts
|
||||
+++ b/src/state/session/agent.ts
|
||||
@@ -39,7 +39,8 @@ export function createPublicAgent() {
|
||||
configureModerationForGuest() // Side effect but only relevant for tests
|
||||
|
||||
const agent = new BskyAppAgent({service: PUBLIC_BSKY_SERVICE})
|
||||
- agent.configureProxy(BLUESKY_PROXY_HEADER.get())
|
||||
+ // Disable proxy for self-hosted environments
|
||||
+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get())
|
||||
return agent
|
||||
}
|
||||
|
||||
@@ -77,7 +78,8 @@ export async function createAgentAndResume(
|
||||
}
|
||||
}
|
||||
|
||||
- agent.configureProxy(BLUESKY_PROXY_HEADER.get())
|
||||
+ // Disable proxy for self-hosted environments
|
||||
+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get())
|
||||
|
||||
return agent.prepare(gates, moderation, onSessionChange)
|
||||
}
|
||||
@@ -112,7 +114,8 @@ export async function createAgentAndLogin(
|
||||
const gates = tryFetchGates(account.did, 'prefer-fresh-gates')
|
||||
const moderation = configureModerationForAccount(agent, account)
|
||||
|
||||
- agent.configureProxy(BLUESKY_PROXY_HEADER.get())
|
||||
+ // Disable proxy for self-hosted environments
|
||||
+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get())
|
||||
|
||||
return agent.prepare(gates, moderation, onSessionChange)
|
||||
}
|
||||
@@ -201,7 +204,8 @@ export async function createAgentAndCreateAccount(
|
||||
logger.error(e, {message: `session: failed snoozeEmailConfirmationPrompt`})
|
||||
}
|
||||
|
||||
- agent.configureProxy(BLUESKY_PROXY_HEADER.get())
|
||||
+ // Disable proxy for self-hosted environments
|
||||
+ // agent.configureProxy(BLUESKY_PROXY_HEADER.get())
|
||||
|
||||
return agent.prepare(gates, moderation, onSessionChange)
|
||||
}
|
||||
Reference in New Issue
Block a user