ai/at
1
0

fix ios chat

This commit is contained in:
2026-03-22 14:48:09 +09:00
parent 87543c1c20
commit e20666abac
2 changed files with 36 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
--- a/src/lib/constants.ts 2026-03-22 12:31:56
+++ b/src/lib/constants.ts 2026-03-22 12:29:49
--- a/src/lib/constants.ts 2026-03-22 15:48:51
+++ b/src/lib/constants.ts 2026-03-22 15:48:23
@@ -7,12 +7,12 @@
export const LOCAL_DEV_SERVICE =
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_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 = {