GCM: Fix accidentally not allowing regitration for some apps

This commit is contained in:
Marvin W 2020-10-18 14:23:10 +02:00
parent a95f6449f5
commit 93636a704d
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A

View File

@ -72,7 +72,7 @@ private suspend fun ensureAppRegistrationAllowed(context: Context, database: Gcm
if (!accepted) {
throw RuntimeException("Push permission not granted to app")
}
} else if (!app.allowRegister) {
} else if (app?.allowRegister == false) {
throw RuntimeException("Push permission not granted to app")
}
}