1
0
Fork 0
mirror of https://github.com/bitwarden/android.git synced 2025-01-30 19:53:47 +03:00

push notification logging

This commit is contained in:
Maciej Zieniuk 2024-12-24 23:04:34 +00:00
parent ae8db9256c
commit 4ffda6d6b4
No known key found for this signature in database
GPG key ID: 9CACE59F1272ACD9

View file

@ -26,7 +26,9 @@ import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.mapNotNull
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import timber.log.Timber
import java.time.Clock
import java.time.ZoneOffset
import java.time.ZonedDateTime
@ -107,6 +109,8 @@ class PushManagerImpl @Inject constructor(
}
override fun onMessageReceived(data: Map<String, String>) {
Timber.tag("PushManager").i(json.encodeToString(data))
val notificationType = data["type"]
?.let { json.decodeFromStringOrNull<NotificationType>(string = it) }
?: return