a tool for shared writing and social publishing
0
fork

Configure Feed

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

fetch record and handle seperately on subscribe

+10 -6
+10 -6
app/lish/subscribeToPublication.ts
··· 45 45 identity: credentialSession.did!, 46 46 }); 47 47 let bsky = new BskyAgent(credentialSession); 48 - let [prefs, profile] = await Promise.all([ 48 + let [prefs, profile, resolveDid] = await Promise.all([ 49 49 bsky.app.bsky.actor.getPreferences(), 50 - bsky.app.bsky.actor.getProfile({ 51 - actor: credentialSession.did!, 50 + bsky.app.bsky.actor.profile.get({ 51 + repo: credentialSession.did!, 52 + rkey: "self", 53 + }), 54 + bsky.com.atproto.identity.resolveIdentity({ 55 + identifier: credentialSession.did!, 52 56 }), 53 57 ]); 54 - if (!identity.bsky_profiles && profile.data) { 58 + if (!identity.bsky_profiles && profile.value) { 55 59 await supabaseServerClient.from("bsky_profiles").insert({ 56 60 did: identity.atp_did, 57 - record: profile.data as unknown as Json, 58 - handle: profile.data.handle, 61 + record: profile.value as Json, 62 + handle: resolveDid.data.handle, 59 63 }); 60 64 } 61 65 let savedFeeds = prefs.data.preferences.find(