From 94a545bd30975bea171cc50112bff74f8273a4d2 Mon Sep 17 00:00:00 2001 From: bagasbanuna Date: Mon, 5 Jan 2026 12:37:14 +0800 Subject: [PATCH 1/2] chore(release): 1.5.32 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07393839..46a5e574 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [1.5.32](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.31...v1.5.32) (2026-01-05) + ## [1.5.31](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.30...v1.5.31) (2025-12-24) ## [1.5.30](https://wibugit.wibudev.com/wibu/hipmi/compare/v1.5.29...v1.5.30) (2025-12-19) diff --git a/package.json b/package.json index 997829db..b6de4ec3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hipmi", - "version": "1.5.31", + "version": "1.5.32", "private": true, "prisma": { "seed": "bun prisma/seed.ts" From 1b206102b0178aaca947c87781032a9472fe2bbb Mon Sep 17 00:00:00 2001 From: bagasbanuna Date: Mon, 5 Jan 2026 14:04:08 +0800 Subject: [PATCH 2/2] Fix API Notifikasi ### No Issue --- src/app/api/mobile/notification/route.ts | 34 ++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/app/api/mobile/notification/route.ts b/src/app/api/mobile/notification/route.ts index c98980c5..90b42061 100644 --- a/src/app/api/mobile/notification/route.ts +++ b/src/app/api/mobile/notification/route.ts @@ -108,10 +108,40 @@ export async function POST(request: NextRequest) { deepLink: deepLink || "", // contoh: senderId, type, etc. }, + // Konfigurasi Android untuk prioritas tinggi + android: { + priority: "high" as const, // Kirim secepatnya, bahkan di doze mode untuk notifikasi penting + notification: { + channelId: "default", // Sesuaikan dengan channel yang kamu buat di Android + // Opsional: sesuaikan icon & warna + // icon: 'ic_notification', + // color: '#FFD700', + }, + // FCM akan bangunkan app jika perlu + ttl: 0 as const, // Kirim secepatnya, jangan tunda + }, + // Opsional: tambahkan untuk iOS juga + apns: { + payload: { + aps: { + sound: "default" as const, + // 'content-available': 1 as const, // jika butuh silent push + }, + }, + }, }; - const response = await adminMessaging.send(message); - console.log("✅ FCM sent:", response); + try { + const response = await adminMessaging.send(message); + console.log( + "✅ FCM sent successfully", + "Response:", + response + ); + } catch (error: any) { + console.error("❌ FCM send failed:", error); + // Lanjutkan ke token berikutnya meski satu gagal + } } } else { return NextResponse.json({