Fixes push registration with empty token ids

This commit is contained in:
Vitor Pamplona
2024-08-28 09:20:40 -04:00
parent 3ebaf2bf1e
commit 1407850e81

View File

@@ -167,10 +167,13 @@ class RegisterAccounts(
}
}
suspend fun go(notificationToken: String) =
withContext(Dispatchers.IO) {
signEventsToProveControlOfAccounts(accounts, notificationToken) { postRegistrationEvent(it) }
suspend fun go(notificationToken: String) {
if (notificationToken.isNotEmpty()) {
withContext(Dispatchers.IO) {
signEventsToProveControlOfAccounts(accounts, notificationToken) { postRegistrationEvent(it) }
PushNotificationUtils.hasInit = true
PushNotificationUtils.hasInit = true
}
}
}
}