Skip to content

Fix entity usage issue #460

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

Merged
merged 6 commits into from
Jun 30, 2025
Merged

Fix entity usage issue #460

merged 6 commits into from
Jun 30, 2025

Conversation

parfeon
Copy link
Contributor

@parfeon parfeon commented Jun 30, 2025

fix(subscription-flow): fix heartbeat cancellation failure

Fix issue because of which in new flow heartbeat request not cancelled properly when issued in
burst.

fix(cbor): fix issue with resource name as integer

Fix issue because resource names, which consist only of integers, have been decoded as Unicode characters.

fix(subscription): fix issue with unsubscription on entity with a similar name

Fix issue because the entity that has been created with -pnpres suffix has been removed
from subscription loop during unsubscribe from entity with presence listening capability.

feat(shared-worker): start backup heartbeat timer

Launch a backup heartbeat timer per registered PubNub instance in SharedWorker context to protect
against browsers throttling of background (hidden) tabs.

refactor(logger): use explicit names of classes instead of constructor

Use string names of classes for locations instead of dynamic access to constructor names because it affect how logs looks like after minification.

parfeon added 2 commits June 30, 2025 15:01
Fix issue because of which in new flow `heartbeat` request not cancelled properly when issued in
burst.

fix(cbor): fix issue with resource name as integer

Fix issue because resource names, which consist only of integers, have been decoded as Unicode
characters.

fix(subscription): fix issue with unsubscription on entity with a similar name

Fix issue because the entity that has been created with `-pnpres` suffix has been removed
from subscription loop during unsubscribe from entity with presence listening capability.

feat(shared-worker): start backup heartbeat timer

Launch a backup heartbeat timer per registered PubNub instance in SharedWorker context to protect
against browsers throttling of background (hidden) tabs.

refactor(logger): use explicit names of classes instead of constructor

Use string names of classes for locations instead of dynamic access to constructor names because it
affect how logs looks like after minification.
@parfeon parfeon self-assigned this Jun 30, 2025
@parfeon parfeon requested a review from mohitpubnub as a code owner June 30, 2025 13:14
@parfeon parfeon added the status: done This issue is considered resolved. label Jun 30, 2025
@parfeon parfeon requested a review from seba-aln as a code owner June 30, 2025 13:14
@parfeon parfeon added priority: medium This PR should be reviewed after all high priority PRs. type: feature This PR contains new feature. type: fix This PR contains fixes to existing features. labels Jun 30, 2025
@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Jun 30, 2025

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

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

return string + String.fromCharCode(byte);
}, '');
} else if (isNumber(key) || (keyIsString && !isNaN(Number(key)))) {
stringifiedKey = String.fromCharCode(isNumber(key) ? key : parseInt(key, 10));
Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏻

Copy link
Contributor

@mohitpubnub mohitpubnub left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -149,7 +149,7 @@ export class EventEngine {
}

unsubscribeAll(isOffline: boolean = false): void {
const channelGroups = this.getSubscribedChannels();
const channelGroups = this.getSubscribedChannelGroups();
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch!

@@ -33,8 +33,8 @@ export const HeartbeatFailedState = new State<HeartbeatFailedStateContext, Event

HeartbeatFailedState.on(joined.type, (context, event) =>
HeartbeatingState.with({
channels: [...context.channels, ...event.payload.channels],
groups: [...context.groups, ...event.payload.groups],
channels: [...context.channels, ...event.payload.channels.filter((channel) => !context.channels.includes(channel))],
Copy link
Contributor

Choose a reason for hiding this comment

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

good to have this
this filtering was missing in presence event engine

@parfeon
Copy link
Contributor Author

parfeon commented Jun 30, 2025

@pubnub-release-bot release

@parfeon parfeon merged commit d44662b into master Jun 30, 2025
9 checks passed
@parfeon parfeon deleted the fix/fix-entity-usage-issue branch June 30, 2025 15:08
@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
priority: medium This PR should be reviewed after all high priority PRs. status: done This issue is considered resolved. type: feature This PR contains new feature. type: fix This PR contains fixes to existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants