From 4d9b9ca0c867b1315d59c9dacbe67b16d4ba77a6 Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Tue, 4 Jan 2022 19:59:26 +0100 Subject: [PATCH] Log FCM priority --- .../play/java/io/heckel/ntfy/firebase/FirebaseService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/play/java/io/heckel/ntfy/firebase/FirebaseService.kt b/app/src/play/java/io/heckel/ntfy/firebase/FirebaseService.kt index a06ea2c..2970bb0 100644 --- a/app/src/play/java/io/heckel/ntfy/firebase/FirebaseService.kt +++ b/app/src/play/java/io/heckel/ntfy/firebase/FirebaseService.kt @@ -57,10 +57,10 @@ class FirebaseService : FirebaseMessagingService() { val priority = data["priority"]?.toIntOrNull() val tags = data["tags"] if (id == null || topic == null || message == null || timestamp == null) { - Log.d(TAG, "Discarding unexpected message: from=${remoteMessage.from}, data=${data}") + Log.d(TAG, "Discarding unexpected message: from=${remoteMessage.from}, fcmprio=${remoteMessage.priority}, fcmprio_orig=${remoteMessage.originalPriority}, data=${data}") return } - Log.d(TAG, "Received notification: from=${remoteMessage.from}, data=${data}") + Log.d(TAG, "Received message: from=${remoteMessage.from}, fcmprio=${remoteMessage.priority}, fcmprio_orig=${remoteMessage.originalPriority}, data=${data}") CoroutineScope(job).launch { val baseUrl = getString(R.string.app_base_url) // Everything from Firebase comes from main service URL! @@ -79,7 +79,7 @@ class FirebaseService : FirebaseMessagingService() { deleted = false ) if (repository.addNotification(notification)) { - Log.d(TAG, "Dispatching notification for message: from=${remoteMessage.from}, data=${data}") + Log.d(TAG, "Dispatching notification for message: from=${remoteMessage.from}, fcmprio=${remoteMessage.priority}, fcmprio_orig=${remoteMessage.originalPriority}, data=${data}") dispatcher.dispatch(subscription, notification) } }