Skip to content

Conversation

marcin-cebo
Copy link
Contributor

@marcin-cebo marcin-cebo commented Oct 15, 2025

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.

}

@Test
public void testGlobalHereNowWithOffset() throws PubNubException {
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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(
Copy link
Contributor

@jguz-pubnub jguz-pubnub Oct 15, 2025

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.

Copy link
Contributor Author

@marcin-cebo marcin-cebo Oct 17, 2025

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?

Copy link
Contributor Author

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.

@jguz-pubnub
Copy link
Contributor

Change the PR title that reflect the scope of changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants