Skip to content
Snippets Groups Projects
Commit bdf3545c authored by Jonah Husson's avatar Jonah Husson
Browse files

Simplify boolean

parent 9bc8e1a2
No related branches found
No related tags found
2 merge requests!30Add huawei provider code,!29Refactor providers to clean up code
......@@ -254,11 +254,11 @@ func (nb *Impl) RegisterForNotifications(request *pb.NotificationRegisterRequest
var provider notifications.Provider
requestProvider := notifications.Provider(request.NotificationProvider)
if requestProvider == notifications.UNKNOWN {
isAPNS := !strings.Contains(request.Token, ":")
if isAPNS {
provider = notifications.APNS
} else {
isFCM := strings.Contains(request.Token, ":")
if isFCM {
provider = notifications.FCM
} else {
provider = notifications.APNS
}
} else {
provider = requestProvider
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment