Skip to content

Commit 2e633a2

Browse files
PubNub SDK v9.6.1 release.
1 parent a5819d1 commit 2e633a2

File tree

11 files changed

+40
-18
lines changed

11 files changed

+40
-18
lines changed

.pubnub.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
---
22
changelog:
3+
- date: 2025-06-18
4+
version: v9.6.1
5+
changes:
6+
- type: bug
7+
text: "Fix issue that has been caused by the race of conditions on tab close and led to `presence leave` for channels that were still in use."
8+
- type: improvement
9+
text: "Make leeway depending from the minimal heartbeat interval (5% from it) to filter out too rapid heartbeat calls."
310
- date: 2025-06-04
411
version: v9.6.0
512
changes:
@@ -1249,7 +1256,7 @@ supported-platforms:
12491256
- 'Ubuntu 14.04 and up'
12501257
- 'Windows 7 and up'
12511258
version: 'Pubnub Javascript for Node'
1252-
version: '9.6.0'
1259+
version: '9.6.1'
12531260
sdks:
12541261
- full-name: PubNub Javascript SDK
12551262
short-name: Javascript
@@ -1265,7 +1272,7 @@ sdks:
12651272
- distribution-type: source
12661273
distribution-repository: GitHub release
12671274
package-name: pubnub.js
1268-
location: https://github.com/pubnub/javascript/archive/refs/tags/v9.6.0.zip
1275+
location: https://github.com/pubnub/javascript/archive/refs/tags/v9.6.1.zip
12691276
requires:
12701277
- name: 'agentkeepalive'
12711278
min-version: '3.5.2'
@@ -1936,7 +1943,7 @@ sdks:
19361943
- distribution-type: library
19371944
distribution-repository: GitHub release
19381945
package-name: pubnub.js
1939-
location: https://github.com/pubnub/javascript/releases/download/v9.6.0/pubnub.9.6.0.js
1946+
location: https://github.com/pubnub/javascript/releases/download/v9.6.1/pubnub.9.6.1.js
19401947
requires:
19411948
- name: 'agentkeepalive'
19421949
min-version: '3.5.2'

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## v9.6.1
2+
June 18 2025
3+
4+
#### Fixed
5+
- Fix issue that has been caused by the race of conditions on tab close and led to `presence leave` for channels that were still in use.
6+
7+
#### Modified
8+
- Make leeway depending from the minimal heartbeat interval (5% from it) to filter out too rapid heartbeat calls.
9+
110
## v9.6.0
211
June 04 2025
312

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Watch [Getting Started with PubNub JS SDK](https://app.dashcam.io/replay/64ee0d2
2727
npm install pubnub
2828
```
2929
* or download one of our builds from our CDN:
30-
* https://cdn.pubnub.com/sdk/javascript/pubnub.9.6.0.js
31-
* https://cdn.pubnub.com/sdk/javascript/pubnub.9.6.0.min.js
30+
* https://cdn.pubnub.com/sdk/javascript/pubnub.9.6.1.js
31+
* https://cdn.pubnub.com/sdk/javascript/pubnub.9.6.1.min.js
3232
3333
2. Configure your keys:
3434

dist/web/pubnub.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4957,7 +4957,7 @@
49574957
return base.PubNubFile;
49584958
},
49594959
get version() {
4960-
return '9.6.0';
4960+
return '9.6.1';
49614961
},
49624962
getVersion() {
49634963
return this.version;

dist/web/pubnub.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/components/configuration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const makeConfiguration = (base, setupCryptoModule) => {
164164
return base.PubNubFile;
165165
},
166166
get version() {
167-
return '9.6.0';
167+
return '9.6.1';
168168
},
169169
getVersion() {
170170
return this.version;

lib/core/components/subscription-manager.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
2121
Object.defineProperty(exports, "__esModule", { value: true });
2222
exports.SubscriptionManager = void 0;
2323
const utils_1 = require("../utils");
24+
const subscribe_1 = require("../endpoints/subscribe");
2425
const reconnection_manager_1 = require("./reconnection_manager");
2526
const categories_1 = __importDefault(require("../constants/categories"));
2627
const deduping_manager_1 = require("./deduping_manager");
@@ -320,10 +321,12 @@ class SubscriptionManager {
320321
region: this.region ? this.region : undefined,
321322
};
322323
this.configuration.logger().debug(this.constructor.name, () => {
323-
const hashedEvents = messages.map((event) => ({
324-
type: event.type,
325-
data: Object.assign(Object.assign({}, event.data), { pn_mfp: (0, utils_1.messageFingerprint)(event.data) }),
326-
}));
324+
const hashedEvents = messages.map((event) => {
325+
const pn_mfp = event.type === subscribe_1.PubNubEventType.Message || event.type === subscribe_1.PubNubEventType.Signal
326+
? (0, utils_1.messageFingerprint)(event.data.message)
327+
: undefined;
328+
return pn_mfp ? { type: event.type, data: Object.assign(Object.assign({}, event.data), { pn_mfp }) } : event;
329+
});
327330
return { messageType: 'object', message: hashedEvents, details: 'Received events:' };
328331
});
329332
messages.forEach((message) => {

lib/core/pubnub-common.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,12 @@ class PubNubCore {
308308
emitMessages: (cursor, events) => {
309309
try {
310310
this.logger.debug('EventEngine', () => {
311-
const hashedEvents = events.map((event) => ({
312-
type: event.type,
313-
data: Object.assign(Object.assign({}, event.data), { pn_mfp: (0, utils_1.messageFingerprint)(event.data) }),
314-
}));
311+
const hashedEvents = events.map((event) => {
312+
const pn_mfp = event.type === subscribe_1.PubNubEventType.Message || event.type === subscribe_1.PubNubEventType.Signal
313+
? (0, utils_1.messageFingerprint)(event.data.message)
314+
: undefined;
315+
return pn_mfp ? { type: event.type, data: Object.assign(Object.assign({}, event.data), { pn_mfp }) } : event;
316+
});
315317
return { messageType: 'object', message: hashedEvents, details: 'Received events:' };
316318
});
317319
events.forEach((event) => this.emitEvent(cursor, event));

lib/entities/subscription.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class Subscription extends subscription_base_1.SubscriptionBase {
116116
if (!this.state.isSubscribed)
117117
return;
118118
if (this.parentSetsCount > 0) {
119+
// Creating from whole payload (not only for published messages).
119120
const fingerprint = (0, utils_1.messageFingerprint)(event.data);
120121
if (this.handledUpdates.includes(fingerprint)) {
121122
this.state.client.logger.trace(this.constructor.name, `Message (${fingerprint}) already handled. Ignoring.`);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pubnub",
3-
"version": "9.6.0",
3+
"version": "9.6.1",
44
"author": "PubNub <support@pubnub.com>",
55
"description": "Publish & Subscribe Real-time Messaging with PubNub",
66
"scripts": {

0 commit comments

Comments
 (0)