Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: feed services recieving the wrong atproto proxy did

xan.lol 9e435a24 43a37122

+12 -5
+6 -5
src/state/feed-feedback.tsx
··· 75 75 const isDiscover = isDiscoverFeed(feed?.feedDescriptor) 76 76 const acceptsInteractions = Boolean(isDiscover || feed?.acceptsInteractions) 77 77 const proxyDid = feed?.view?.did 78 + const feedAgent = useMemo( 79 + () => (proxyDid ? agent.withProxy('bsky_fg', proxyDid) : null), 80 + [agent, proxyDid], 81 + ) 78 82 const enabled = 79 83 Boolean(feed) && Boolean(proxyDid) && acceptsInteractions && hasSession 80 84 ··· 151 155 } 152 156 153 157 // Send to the feed 154 - agent.app.bsky.feed 158 + feedAgent?.app.bsky.feed 155 159 .sendInteractions( 156 160 {interactions: interactionsToSend, feed: feed?.uri}, 157 161 { 158 162 encoding: 'application/json', 159 - headers: { 160 - 'atproto-proxy': `${proxyDid}#bsky_fg`, 161 - }, 162 163 }, 163 164 ) 164 165 .catch(() => {}) // ignore upstream errors ··· 172 173 ) 173 174 throttledFlushAggregatedStats() 174 175 logger.debug('flushed') 175 - }, [agent, throttledFlushAggregatedStats, proxyDid, enabled, feed]) 176 + }, [feedAgent, throttledFlushAggregatedStats, enabled, feed]) 176 177 177 178 const sendToFeed = useMemo( 178 179 () =>
+6
src/state/session/agent.ts
··· 368 368 persistSessionHandler: ((event: AtpSessionEvent) => void) | undefined = 369 369 undefined 370 370 371 + clone(): this { 372 + // `withProxy()` calls `clone()`. Since this class subclasses `BskyAgent`, 373 + // we must provide our own clone implementation. 374 + return this.copyInto(new BskyAgent(this.sessionManager) as this) 375 + } 376 + 371 377 constructor({service}: {service: string}) { 372 378 super({ 373 379 service,