tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
return if no handle in sync document metadata
awarm.space
1 month ago
ffb44ee2
fc660a92
+2
1 changed file
expand all
collapse all
unified
split
app
api
inngest
functions
sync_document_metadata.ts
+2
app/api/inngest/functions/sync_document_metadata.ts
···
21
const handle = doc?.alsoKnownAs
22
?.find((a) => a.startsWith("at://"))
23
?.replace("at://", "");
0
24
const isBridgy = !!doc?.service?.find(
25
(s) => s.serviceEndpoint === "https://atproto.brid.gy",
26
);
27
return { handle: handle ?? null, isBridgy };
28
});
0
29
30
await step.run("set-indexed", async () => {
31
await supabaseServerClient
···
21
const handle = doc?.alsoKnownAs
22
?.find((a) => a.startsWith("at://"))
23
?.replace("at://", "");
24
+
if (!doc) return null;
25
const isBridgy = !!doc?.service?.find(
26
(s) => s.serviceEndpoint === "https://atproto.brid.gy",
27
);
28
return { handle: handle ?? null, isBridgy };
29
});
30
+
if (!handleResult) return { error: "No Handle" };
31
32
await step.run("set-indexed", async () => {
33
await supabaseServerClient