From 5e94be2acce0da4d6c376bb3b9071f14cb9ffd9b Mon Sep 17 00:00:00 2001 From: Konstantin Ivanov <54908981+konstantiniiv@users.noreply.github.com> Date: Thu, 22 May 2025 13:45:27 +0200 Subject: [PATCH] DROID-3628 Push | Json error fix (#2434) --- .../java/com/anytypeio/anytype/device/AnytypePushService.kt | 2 +- .../presentation/notifications/DecryptionPushContentService.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/anytypeio/anytype/device/AnytypePushService.kt b/app/src/main/java/com/anytypeio/anytype/device/AnytypePushService.kt index 6308a87245..92fc1bc3ac 100644 --- a/app/src/main/java/com/anytypeio/anytype/device/AnytypePushService.kt +++ b/app/src/main/java/com/anytypeio/anytype/device/AnytypePushService.kt @@ -105,7 +105,7 @@ class AnytypePushService : FirebaseMessagingService() { // Build the notification val notification = NotificationCompat.Builder(this, CHANNEL_ID) - //.setSmallIcon(R.drawable.ic_push_icon) + .setSmallIcon(R.drawable.ic_app_notification) .setContentTitle(message.spaceName.trim()) .setSubText(message.senderName.trim()) .setContentText(message.text.trim()) diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/notifications/DecryptionPushContentService.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/notifications/DecryptionPushContentService.kt index 6683c0203a..b49c5abe15 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/notifications/DecryptionPushContentService.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/notifications/DecryptionPushContentService.kt @@ -49,7 +49,7 @@ class DecryptionPushContentServiceImpl @Inject constructor( // Parse the decrypted JSON try { - Json.decodeFromStream(decryptedData.inputStream()) + Json { ignoreUnknownKeys = true }.decodeFromStream(decryptedData.inputStream()) } catch (e: Exception) { Timber.e(e, "Failed to parse decrypted data for keyId: $keyId") null