Skip to content

Commit

Permalink
Add default value to legacy notification types
Browse files Browse the repository at this point in the history
  • Loading branch information
jinliu9508 committed Feb 8, 2024
1 parent 6c6b12c commit 0603376
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ internal class OneSignalImp : IOneSignal, IServiceProvider {

if (legacyUserSyncString != null) {
val legacyUserSyncJSON = JSONObject(legacyUserSyncString)
val notificationTypes = legacyUserSyncJSON.getInt("notification_types")
val notificationTypes = legacyUserSyncJSON.optInt("notification_types", SubscriptionStatus.NO_PERMISSION.value)

val pushSubscriptionModel = SubscriptionModel()
pushSubscriptionModel.id = legacyPlayerId
Expand Down

0 comments on commit 0603376

Please sign in to comment.