a tool for shared writing and social publishing
0
fork

Configure Feed

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

publish bsky post properly for new records

+4 -7
+4 -7
app/[leaflet_id]/publish/publishBskyPost.ts
··· 8 8 import sharp from "sharp"; 9 9 import { TID } from "@atproto/common"; 10 10 import { getIdentityData } from "actions/getIdentityData"; 11 - import { AtpBaseClient, PubLeafletDocument } from "lexicons/api"; 12 - import { 13 - restoreOAuthSession, 14 - OAuthSessionError, 15 - } from "src/atproto-oauth"; 11 + import { AtpBaseClient, SiteStandardDocument } from "lexicons/api"; 12 + import { restoreOAuthSession, OAuthSessionError } from "src/atproto-oauth"; 16 13 import { supabaseServerClient } from "supabase/serverClient"; 17 14 import { Json } from "supabase/database.types"; 18 15 import { ··· 30 27 url: string; 31 28 title: string; 32 29 description: string; 33 - document_record: PubLeafletDocument.Record; 30 + document_record: SiteStandardDocument.Record; 34 31 rkey: string; 35 32 facets: AppBskyRichtextFacet.Main[]; 36 33 }): Promise<PublishBskyResult> { ··· 115 112 }, 116 113 ); 117 114 let record = args.document_record; 118 - record.postRef = post; 115 + record.bskyPostRef = post; 119 116 120 117 let { data: result } = await agent.com.atproto.repo.putRecord({ 121 118 rkey: args.rkey,