diff --git a/classes/workers/push.ts b/classes/workers/push.ts index cc50721b..4ea1920c 100644 --- a/classes/workers/push.ts +++ b/classes/workers/push.ts @@ -18,6 +18,10 @@ export const getPushWorker = (): Worker => data: { psId, relatedUserId, type, noteId, notificationId }, } = job; + await job.log( + `Sending push notification for note [${notificationId}]`, + ); + const ps = await PushSubscription.fromId(psId); if (!ps) { @@ -87,7 +91,7 @@ export const getPushWorker = (): Worker => ? htmlToText(note.data.spoilerText || note.data.content) : htmlToText(relatedUser.data.note); - sendNotification( + await sendNotification( { endpoint: ps.data.endpoint, keys: { @@ -115,6 +119,10 @@ export const getPushWorker = (): Worker => }, }, ); + + await job.log( + `✔ Finished delivering push notification for note [${notificationId}]`, + ); }, { connection,