fix: is_send & is_delivered in onNotificationReminder

This commit is contained in:
Muhammad Afif
2026-06-03 15:08:55 +07:00
parent 73b05c5d0d
commit 3d53bf4702
2 changed files with 13 additions and 31 deletions

View File

@@ -538,6 +538,18 @@ class NotifikasiWaService {
param.bodyMessage
);
// await this.saveLogReminder({
// message: `Reminder dijalankan`,
// resultSend
// })
await updateNotificationErrorUserDb(
resultNotificationErrorUser[0].notification_error_user_id,
{
is_send: resultSend.success,
}
);
await this.saveReminder({
notification_log: resultNotificationError.notification_error_id,
error_code_id: data['error_code_id'],
@@ -554,18 +566,6 @@ class NotifikasiWaService {
message: `Reminder untuk ${deviceName} dengan reminder ${chanel.value} telah dijalankan pada ${now.format('DD-MM-YYYY HH:mm:ss')}, hasil pengiriman: ${resultSend.success ? 'sukses' : 'gagal'}`,
}, false);
// await this.saveLogReminder({
// message: `Reminder dijalankan`,
// resultSend
// })
await updateNotificationErrorUserDb(
resultNotificationErrorUser[0].notification_error_user_id,
{
is_send: resultSend.success,
}
);
if (resultSend.success) {
isSendNotification = resultSend.success;
}