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
29
pulls
pipelines
publish notifications to db
awarm.space
4 months ago
7881f8fd
766a1221
+15
1 changed file
expand all
collapse all
unified
split
app
lish
[did]
[publication]
[rkey]
Interactions
Comments
commentAction.ts
+15
app/lish/[did]/[publication]/[rkey]/Interactions/Comments/commentAction.ts
···
65
65
} as unknown as Json,
66
66
})
67
67
.select();
68
68
+
let notifications = [
69
69
+
{
70
70
+
comment: uri.toString(),
71
71
+
identity: new AtUri(args.document).host,
72
72
+
reason: "reply-on-post",
73
73
+
},
74
74
+
];
75
75
+
if (args.comment.replyTo)
76
76
+
notifications.push({
77
77
+
comment: uri.toString(),
78
78
+
identity: new AtUri(args.comment.replyTo).host,
79
79
+
reason: "reply-to-comment",
80
80
+
});
81
81
+
// SOMEDAY: move this out the action with inngest or workflows
82
82
+
await supabaseServerClient.from("notif_comments").insert(notifications);
68
83
69
84
return {
70
85
record: data?.[0].record as Json,