|
|
|
@ -435,7 +435,16 @@ public enum PushNotificationAPI {
|
|
|
|
|
|
|
|
|
|
// If the metadata says that the message was too large then we should show the generic
|
|
|
|
|
// notification (this is a valid case)
|
|
|
|
|
guard !notification.info.dataTooLong else { return (nil, notification.info, .successTooLong) }
|
|
|
|
|
guard !notification.info.dataTooLong else {
|
|
|
|
|
SNLog("Ignoring notification due to data being too long")
|
|
|
|
|
return (nil, notification.info, .successTooLong)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Only show notifcations for messages from default namespace
|
|
|
|
|
guard notification.info.namespace == .default else {
|
|
|
|
|
SNLog("Ignoring notification due to namespace being \(notification.info.namespace) instead of default")
|
|
|
|
|
return (nil, notification.info, .failureNoContent)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check that the body we were given is valid
|
|
|
|
|
guard
|
|
|
|
|