-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote Notification Type #60
Conversation
Codecov Report
@@ Coverage Diff @@
## master #60 +/- ##
===========================================
+ Coverage 83.18% 97.02% +13.83%
===========================================
Files 29 16 -13
Lines 1249 538 -711
Branches 38 0 -38
===========================================
- Hits 1039 522 -517
+ Misses 210 16 -194
Continue to review full report at Codecov.
|
Sources/EventTypeHandler.swift
Outdated
let pusher = data["pusher"] as? Dictionary<String, Any> | ||
else { return .Other } | ||
|
||
return pusher["isInternalOnly"] != nil ? .Internal : .Other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have isInternalOnly
value in the payload we know that it's internal remote notification.
Other
doesn't sound right to me - it needs to be renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User
?
a33b90f
to
a65e998
Compare
Sources/EventTypeHandler.swift
Outdated
@@ -67,4 +67,13 @@ struct EventTypeHandler { | |||
// Returns `true` if there is any additional information provided. | |||
return data.count > 1 | |||
} | |||
|
|||
static func isInternalNotification(_ userInfo: [AnyHashable: Any]) -> RemoteNotificationType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getRemoteNotificationType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
3f45908
to
35dd774
Compare
What?
Usage:
CC @pusher/mobile