fix social-app uri
This commit is contained in:
@ -87,6 +87,26 @@ export default function App() {
|
||||
fetchUserChatRecords()
|
||||
}, [user, agent])
|
||||
|
||||
// Expose AI profile data to blog's ask-ai.js
|
||||
useEffect(() => {
|
||||
if (adminData?.profile) {
|
||||
console.log('AI profile loaded:', adminData.profile)
|
||||
|
||||
// Make AI profile data available globally for ask-ai.js
|
||||
window.aiProfileData = {
|
||||
did: adminData.did,
|
||||
handle: adminData.profile.handle,
|
||||
displayName: adminData.profile.displayName,
|
||||
avatar: adminData.profile.avatar
|
||||
}
|
||||
|
||||
// Dispatch event to notify ask-ai.js
|
||||
window.dispatchEvent(new CustomEvent('aiProfileLoaded', {
|
||||
detail: window.aiProfileData
|
||||
}))
|
||||
}
|
||||
}, [adminData])
|
||||
|
||||
// Event listeners for blog communication
|
||||
useEffect(() => {
|
||||
// Clear OAuth completion flag once app is loaded
|
||||
|
@ -13,7 +13,7 @@ function getCorrectWebUrl(avatarUrl) {
|
||||
|
||||
// If avatar is from syu.is, use web.syu.is
|
||||
if (avatarUrl.includes('bsky.syu.is') || avatarUrl.includes('syu.is')) {
|
||||
return 'https://web.syu.is'
|
||||
return 'https://syu.is'
|
||||
}
|
||||
|
||||
// Default to bsky.app
|
||||
@ -151,4 +151,4 @@ export default function RecordList({ title, records, apiConfig, showTitle = true
|
||||
))}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ export function getApiConfig(pds) {
|
||||
pds: `https://${env.pds}`,
|
||||
bsky: `https://bsky.${env.pds}`,
|
||||
plc: `https://plc.${env.pds}`,
|
||||
web: `https://web.${env.pds}`
|
||||
web: `https://${env.pds}`
|
||||
}
|
||||
}
|
||||
return {
|
||||
@ -36,4 +36,4 @@ export async function getPdsFromHandle(handle) {
|
||||
.then(res => res.json())
|
||||
|
||||
return data.didDoc?.service?.[0]?.serviceEndpoint || initialPds
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user