File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
main/kotlin/com/x8bit/bitwarden/data/platform/manager/model
test/kotlin/com/x8bit/bitwarden/data/platform/manager Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ sealed class NotificationPayload {
5757 @JsonNames(" Date" , " date" )
5858 val date : ZonedDateTime ? ,
5959
60- @JsonNames(" PushNotificationLogOutReason " , " pushNotificationLogOutReason " )
60+ @JsonNames(" Reason " , " reason " )
6161 val pushNotificationLogOutReason : PushNotificationLogOutReason ? ,
6262 ) : NotificationPayload()
6363
Original file line number Diff line number Diff line change 11package com.x8bit.bitwarden.data.platform.manager.model
22
3+ import androidx.annotation.Keep
4+ import com.bitwarden.core.data.serializer.BaseEnumeratedIntSerializer
35import kotlinx.serialization.SerialName
6+ import kotlinx.serialization.Serializable
47
58/* *
69 * Enumerated values to represent the possible reasons for a log out push notification
710 */
11+ @Serializable(with = PushNotificationLogOutReasonSerializer ::class )
812enum class PushNotificationLogOutReason {
913 @SerialName(" 0" )
1014 KDF_CHANGE ,
1115}
16+
17+ @Keep
18+ private class PushNotificationLogOutReasonSerializer :
19+ BaseEnumeratedIntSerializer <PushNotificationLogOutReason >(
20+ className = " PushNotificationLogOutReason" ,
21+ values = PushNotificationLogOutReason .entries.toTypedArray(),
22+ )
Original file line number Diff line number Diff line change @@ -975,7 +975,7 @@ private val LOGOUT_KDF_NOTIFICATION_MAP = mapOf(
975975 " payload" to """ {
976976 "UserId": "078966a2-93c2-4618-ae2a-0a2394c88d37",
977977 "Date": "2023-10-27T12:00:00.000Z",
978- "PushNotificationLogOutReason ": "0"
978+ "Reason ": 0
979979 }""" ,
980980)
981981
You can’t perform that action at this time.
0 commit comments