diff --git a/app/lish/[did]/[publication]/[rkey]/Interactions/Comments/commentAction.ts b/app/lish/[did]/[publication]/[rkey]/Interactions/Comments/commentAction.ts index 1df1c06e..2bf0b44a 100644 --- a/app/lish/[did]/[publication]/[rkey]/Interactions/Comments/commentAction.ts +++ b/app/lish/[did]/[publication]/[rkey]/Interactions/Comments/commentAction.ts @@ -65,6 +65,21 @@ export async function publishComment(args: { } as unknown as Json, }) .select(); + let notifications = [ + { + comment: uri.toString(), + identity: new AtUri(args.document).host, + reason: "reply-on-post", + }, + ]; + if (args.comment.replyTo) + notifications.push({ + comment: uri.toString(), + identity: new AtUri(args.comment.replyTo).host, + reason: "reply-to-comment", + }); + // SOMEDAY: move this out the action with inngest or workflows + await supabaseServerClient.from("notif_comments").insert(notifications); return { record: data?.[0].record as Json,