Skip to content

Commit

Permalink
Updating apns feedback handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Hahn committed Jan 19, 2018
1 parent cf84370 commit 9116917
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions extensions/apns_message_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func (a *APNSMessageHandler) handleAPNSResponse(responseWithMetadata *structs.Re

err = pErr
switch reason {
case apns2.ReasonBadDeviceToken, apns2.ReasonUnregistered:
case apns2.ReasonBadDeviceToken, apns2.ReasonUnregistered, apns2.ReasonTopicDisallowed, apns2.ReasonDeviceTokenNotForTopic:
// https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html
l.WithFields(log.Fields{
"category": "TokenError",
Expand All @@ -290,7 +290,7 @@ func (a *APNSMessageHandler) handleAPNSResponse(responseWithMetadata *structs.Re
"category": "ProviderTokenError",
log.ErrorKey: responseWithMetadata.Reason,
}).Debug("received an error")
case apns2.ReasonMissingTopic, apns2.ReasonTopicDisallowed, apns2.ReasonDeviceTokenNotForTopic:
case apns2.ReasonMissingTopic:
l.WithFields(log.Fields{
"category": "TopicError",
log.ErrorKey: responseWithMetadata.Reason,
Expand Down
3 changes: 0 additions & 3 deletions pusher/gcm.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ func (g *GCMPusher) configure(client interfaces.GCMClient, db interfaces.DB, sta
}
g.MessageHandler[k] = handler
}
if err != nil {
return err
}
return nil
}

Expand Down

0 comments on commit 9116917

Please sign in to comment.