a tool for shared writing and social publishing

revert to old doc write flow

+12 -2
+12 -2
app/api/inngest/functions/sync_document_metadata.ts
··· 39 39 }); 40 40 if (!handleResult) return { error: "No Handle" }; 41 41 42 + if (handleResult.isBridgy) { 43 + await step.run("delete-bridgy-doc", async () => { 44 + return await supabaseServerClient 45 + .from("documents") 46 + .delete() 47 + .eq("uri", document_uri); 48 + }); 49 + return { handle: handleResult.handle, deleted: true }; 50 + } 51 + 42 52 await step.run("set-indexed", async () => { 43 53 return await supabaseServerClient 44 54 .from("documents") 45 - .update({ indexed: !handleResult.isBridgy }) 55 + .update({ indexed: true }) 46 56 .eq("uri", document_uri) 47 57 .select(); 48 58 }); 49 59 50 - if (!bsky_post_uri || handleResult.isBridgy) { 60 + if (!bsky_post_uri) { 51 61 return { handle: handleResult.handle }; 52 62 } 53 63