diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-02-19 23:21:36 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-02-19 23:21:36 -0600 |
commit | 8566d299609f6267edd2e1a24724c3e4cbb45efb (patch) | |
tree | d5f8b29fcaca5da638313bf8a3c4266d378fc1dc /shared/src/commonMain | |
parent | e0861bf29a6688195019cd74c6f81c61a24ff0a5 (diff) | |
parent | efd939e18cf3eab8db0146f8428c58f3cf14a185 (diff) | |
download | etbsa-trackermap-mobile-8566d299609f6267edd2e1a24724c3e4cbb45efb.tar.gz etbsa-trackermap-mobile-8566d299609f6267edd2e1a24724c3e4cbb45efb.tar.bz2 etbsa-trackermap-mobile-8566d299609f6267edd2e1a24724c3e4cbb45efb.zip |
Merge branch 'ios_app' into fcm_fix
Diffstat (limited to 'shared/src/commonMain')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt index d3deca1..48352bf 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/SessionController.kt @@ -113,7 +113,7 @@ class SessionController( try { userFlow.value?.let { user -> val attributes = user.attributes.toMutableMap() - attributes["notificationTokens"].toString().let { tokens -> + attributes["notificationTokens"]?.content?.let { tokens -> if (tokens == "null" || !tokens.contains(token)) { if (tokens == "null") { attributes["notificationTokens"] = JsonPrimitive(token) @@ -123,6 +123,8 @@ class SessionController( } + } ?: run { + attributes["notificationTokens"] = JsonPrimitive(token) } usersApi.usersIdPut(user.copy( attributes = attributes |