-
Notifications
You must be signed in to change notification settings - Fork 8
Mc/gcm byebye #376
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
base: master
Are you sure you want to change the base?
Mc/gcm byebye #376
Conversation
…make behaviour consistent with multi-channel calls.
Added deprecation warning for old APNS. APNS2 should be used instead. In case FCM is chosen as PushType type REST query param gets fcm value instead of gcm.
} | ||
|
||
@Test | ||
public void testGlobalHereNowWithOffset() throws PubNubException { |
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.
Are you sure global HereNow supports limit and offset parameters?
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.
Yes, somehow it does.
return HereNowImpl( | ||
jsPubNub, | ||
createJsObject { | ||
// todo handle limit and offset |
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.
Is additional work required due to this comment?
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.
Yes, additional work is required for JS and Swift part of KMP. But will be handled in separate PR
"Channel and/or ChannelGroup contains empty string which is not allowed.", | ||
), | ||
|
||
HERE_NOW_OFFSET_OUT_OF_RANGE( |
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.
It’s better to use UInt
for limit and offset to ensure they’re never negative, which eliminates the need for extra validations. Otherwise, keep them as Int
and just document that the values must be greater than zero. No need for defensive checks.
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.
Good point. Uint could solve validation problem but we don't use Uint because code is also used by Java users and in Java there is no Uint and it would not comfortable to convert int to Uint. Documentation contains info about them being greater than zero.
No need for defensive checks.
What problem do you see with those checks?
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.
After discussion on Daily I will remove some validations.
Change the PR title that reflect the scope of changes |
Added limit and offset to HereNow API.
Removed MPSN as available push type.
Added deprecation warning for old APNS. APNS2 should be used instead.
In case FCM is chosen as PushType type REST query param gets fcm value instead of gcm.