Skip to content

hereNow with limit, offset, deprecated gcm, apns and removed mpns push notification gateway type#264

Merged
mohitpubnub merged 16 commits intomasterfrom
CLEN-2954
Oct 28, 2025
Merged

hereNow with limit, offset, deprecated gcm, apns and removed mpns push notification gateway type#264
mohitpubnub merged 16 commits intomasterfrom
CLEN-2954

Conversation

@mohitpubnub
Copy link
Contributor

@mohitpubnub mohitpubnub commented Sep 30, 2025

fix: deprecate gcm and re-map it to fcm

Discard use of gcm and replaced with fcm for push notification service type of google. Removed mpns support.

feat(presence): support for Limit and Offset parameters to the HereNow API.

BREAKING CHANGES: The HereNow method will return a maximum of 1000 occupants per channel. Previously, it was returning all occupants without limit parameter support. Use pagination through offset when more than 1000 occupants present in channel.

test: added new tests for duplicate subscribe requests.

@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Sep 30, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Contributor

@jakub-grzesiowski jakub-grzesiowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}
else if (pushType == PNPushType.MPNS)
{
Dictionary<string, object> pnMpns = BuildMpnsPayload(pushType);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you going to allow "fcm" as value for query param called "type" in all API calls related to PushNotificaiton?

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, it's accepted by server.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thank you

@mohitpubnub mohitpubnub changed the title fix: deprecate gcm push service type hereNow with limit, offset, deprecated gcm, apns and removed mpns push notification gateway type Oct 17, 2025
Copy link
Contributor

@jakub-grzesiowski jakub-grzesiowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, apart from that LGTM!

}

logger?.Info($"{GetType().Name} request finished with status code {returnValue.Status?.StatusCode}");
logger?.Trace($"{GetType().Name} request finished with status code {returnValue.Status?.StatusCode}");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied formatting this time. this file was not formatted.
Or May be IDE setting change!! I'll check it. 👍

if (limit > 1000)
{
logger.Debug(
"Provided 'limit' value exceeds the maximum allowed (1000). The value has been capped to 1000.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be capped on server side or should there be an assignment here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to explicitly provide this parameter value always.

_pubnub.Subscribe<object>().Channels(new[] { "c1" }).Execute();

// Wait 5 seconds - expect at least 1 heartbeat (at 3s)
await Task.Delay(TimeSpan.FromSeconds(5));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an issue but interesting how it's TimeSpan.FromSeconds(5) instead of just 5000, I'm assuming an AI quirk? 😅

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, AI

@mohitpubnub
Copy link
Contributor Author

@pubnub-release-bot release as v8.0.0.0

@mohitpubnub mohitpubnub merged commit e3e6043 into master Oct 28, 2025
8 checks passed
@mohitpubnub mohitpubnub deleted the CLEN-2954 branch October 28, 2025 04:25
@pubnub-release-bot
Copy link
Contributor

🚀 Release successfully completed 🚀

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.

5 participants