fix ios chat
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
--- a/src/lib/constants.ts 2026-03-22 12:31:56
|
--- a/src/lib/constants.ts 2026-03-22 15:48:51
|
||||||
+++ b/src/lib/constants.ts 2026-03-22 12:29:49
|
+++ b/src/lib/constants.ts 2026-03-22 15:48:23
|
||||||
@@ -7,12 +7,12 @@
|
@@ -7,12 +7,12 @@
|
||||||
export const LOCAL_DEV_SERVICE =
|
export const LOCAL_DEV_SERVICE =
|
||||||
Platform.OS === 'android' ? 'http://10.0.2.2:2583' : 'http://localhost:2583'
|
Platform.OS === 'android' ? 'http://10.0.2.2:2583' : 'http://localhost:2583'
|
||||||
@@ -105,7 +105,26 @@
|
|||||||
export const DEV_ENV_APPVIEW = `http://localhost:2584` // always the same
|
export const DEV_ENV_APPVIEW = `http://localhost:2584` // always the same
|
||||||
export const DEV_ENV_APPVIEW_DID = `did:plc:dw4kbjf5mn7nhenabiqpkyh3` // always the same
|
export const DEV_ENV_APPVIEW_DID = `did:plc:dw4kbjf5mn7nhenabiqpkyh3` // always the same
|
||||||
|
|
||||||
@@ -248,8 +279,8 @@
|
@@ -235,10 +266,16 @@
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-export const DM_SERVICE_HEADERS = {
|
||||||
|
- 'atproto-proxy': `${CHAT_PROXY_DID}#bsky_chat`,
|
||||||
|
+export const DM_SERVICE_HEADERS: {'atproto-proxy': string} = {
|
||||||
|
+ 'atproto-proxy': `${OFFICIAL_CHAT_DID}#bsky_chat`,
|
||||||
|
}
|
||||||
|
|
||||||
|
+export function updateDmServiceHeaders(serviceUrl?: string) {
|
||||||
|
+ DM_SERVICE_HEADERS['atproto-proxy'] = isSelfHostedService(serviceUrl)
|
||||||
|
+ ? `${PUBLIC_APPVIEW_DID}#bsky_chat`
|
||||||
|
+ : `${OFFICIAL_CHAT_DID}#bsky_chat`
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
export const BLUESKY_MOD_SERVICE_HEADERS = {
|
||||||
|
'atproto-proxy': `${BSKY_LABELER_DID}#atproto_labeler`,
|
||||||
|
}
|
||||||
|
@@ -248,8 +285,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
export const webLinks = {
|
export const webLinks = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--- a/src/state/session/agent.ts 2026-03-15 19:17:45
|
--- a/src/state/session/agent.ts 2026-03-22 15:48:51
|
||||||
+++ b/src/state/session/agent.ts 2026-03-15 19:17:18
|
+++ b/src/state/session/agent.ts 2026-03-22 15:48:40
|
||||||
@@ -18,6 +18,8 @@
|
@@ -18,9 +18,12 @@
|
||||||
BLUESKY_PROXY_HEADER,
|
BLUESKY_PROXY_HEADER,
|
||||||
BSKY_SERVICE,
|
BSKY_SERVICE,
|
||||||
DISCOVER_SAVED_FEED,
|
DISCOVER_SAVED_FEED,
|
||||||
@@ -9,7 +9,11 @@
|
|||||||
IS_PROD_SERVICE,
|
IS_PROD_SERVICE,
|
||||||
PUBLIC_BSKY_SERVICE,
|
PUBLIC_BSKY_SERVICE,
|
||||||
TIMELINE_SAVED_FEED,
|
TIMELINE_SAVED_FEED,
|
||||||
@@ -47,7 +49,9 @@
|
+ updateDmServiceHeaders,
|
||||||
|
} from '#/lib/constants'
|
||||||
|
import {getAge} from '#/lib/strings/time'
|
||||||
|
import {logger} from '#/logger'
|
||||||
|
@@ -47,7 +50,9 @@
|
||||||
configureModerationForGuest() // Side effect but only relevant for tests
|
configureModerationForGuest() // Side effect but only relevant for tests
|
||||||
|
|
||||||
const agent = new BskyAppAgent({service: PUBLIC_BSKY_SERVICE})
|
const agent = new BskyAppAgent({service: PUBLIC_BSKY_SERVICE})
|
||||||
@@ -20,7 +24,7 @@
|
|||||||
return agent
|
return agent
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +81,9 @@
|
@@ -77,7 +82,10 @@
|
||||||
// after session is attached
|
// after session is attached
|
||||||
const aa = prefetchAgeAssuranceData({agent})
|
const aa = prefetchAgeAssuranceData({agent})
|
||||||
|
|
||||||
@@ -28,10 +32,11 @@
|
|||||||
+ if (!isSelfHostedService(storedAccount.service)) {
|
+ if (!isSelfHostedService(storedAccount.service)) {
|
||||||
+ agent.configureProxy(getProxyHeader(storedAccount.service))
|
+ agent.configureProxy(getProxyHeader(storedAccount.service))
|
||||||
+ }
|
+ }
|
||||||
|
+ updateDmServiceHeaders(storedAccount.service)
|
||||||
|
|
||||||
return agent.prepare({
|
return agent.prepare({
|
||||||
resolvers: [gates, moderation, aa],
|
resolvers: [gates, moderation, aa],
|
||||||
@@ -116,7 +122,9 @@
|
@@ -116,7 +124,10 @@
|
||||||
const moderation = configureModerationForAccount(agent, account)
|
const moderation = configureModerationForAccount(agent, account)
|
||||||
const aa = prefetchAgeAssuranceData({agent})
|
const aa = prefetchAgeAssuranceData({agent})
|
||||||
|
|
||||||
@@ -39,10 +44,11 @@
|
|||||||
+ if (!isSelfHostedService(service)) {
|
+ if (!isSelfHostedService(service)) {
|
||||||
+ agent.configureProxy(getProxyHeader(service))
|
+ agent.configureProxy(getProxyHeader(service))
|
||||||
+ }
|
+ }
|
||||||
|
+ updateDmServiceHeaders(service)
|
||||||
|
|
||||||
return agent.prepare({
|
return agent.prepare({
|
||||||
resolvers: [gates, moderation, aa],
|
resolvers: [gates, moderation, aa],
|
||||||
@@ -288,7 +296,9 @@
|
@@ -288,7 +299,10 @@
|
||||||
logger.error(e, {message: `session: failed snoozeEmailConfirmationPrompt`})
|
logger.error(e, {message: `session: failed snoozeEmailConfirmationPrompt`})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,11 +56,10 @@
|
|||||||
+ if (!isSelfHostedService(service)) {
|
+ if (!isSelfHostedService(service)) {
|
||||||
+ agent.configureProxy(getProxyHeader(service))
|
+ agent.configureProxy(getProxyHeader(service))
|
||||||
+ }
|
+ }
|
||||||
|
+ updateDmServiceHeaders(service)
|
||||||
|
|
||||||
return agent.prepare({
|
return agent.prepare({
|
||||||
resolvers: [gates, moderation, aa],
|
resolvers: [gates, moderation, aa],
|
||||||
diff --git a/src/App.native.tsx b/src/App.native.tsx
|
|
||||||
index 2c4d6fa41..b69e2b18d 100644
|
|
||||||
--- a/src/App.native.tsx
|
--- a/src/App.native.tsx
|
||||||
+++ b/src/App.native.tsx
|
+++ b/src/App.native.tsx
|
||||||
@@ -95,7 +95,7 @@ if (isAndroid) {
|
@@ -95,7 +95,7 @@ if (isAndroid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user