From e9564826d0436f52bec08f22a334251f88ef62ad Mon Sep 17 00:00:00 2001 From: Ryan Freeman Date: Sat, 22 Mar 2025 16:32:53 +0000 Subject: [PATCH] Update comment notification body --- app/actions/comments.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/actions/comments.ts b/app/actions/comments.ts index c791e63..bd7b8b0 100644 --- a/app/actions/comments.ts +++ b/app/actions/comments.ts @@ -9,10 +9,10 @@ export async function loginWithGitHub() { await signIn('github') } -const notificationBody = (comment: any, user: any) => { +const notificationBody = (comment: { id: number, content: string }, user: { name: string }) => { return { topic: 'comments', - message: `You have a new comment from ${user.name}:\n${comment.content}\n`, + message: `You've got a new comment from ${user.name}:\n${comment.content}`, actions: [ { action: 'http', @@ -21,7 +21,8 @@ const notificationBody = (comment: any, user: any) => { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.NTFY_TOKEN}` - } + }, + clear: true } ] }