-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add Interceptor support for PUSH_REGISTER and PUSH_AUTHENTICATE Action types #218
Conversation
class PushRequestInterceptor: RequestInterceptor { | ||
func intercept(request: Request, action: Action) -> Request { | ||
if action.type == "PUSH_REGISTER" { | ||
RequestInterceptorTests.intercepted.append("PUSH_REGISTER") |
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.
as an extra step in the test, i think we can add some custom header in request and add those custom header part of AM_Push_Registration_Successful mocks to make sure the request has custom header .
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.
Updated the tests. added custom header to the request.
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.
just make sure this changes will work all type of authentication like number challenge, biometric authentication, accept from the push notification with or without opening the app
Updated the test to use more generic handleNotification method that is called for accepting/denying all types of push notifications |
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.
Changes looks good to me
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.
Looks good! 👍🏻
SDKS-2545
Add Interceptor support for PUSH_REGISTER and PUSH_AUTHENTICATE Action types
Add unit tests