Skip to content

Commit 8adfccd

Browse files
fix/CLEN-1440 (#335)
* fix: missing get and set methods for userId are added * PubNub SDK v7.3.1 release. --------- Co-authored-by: PubNub Release Bot <120067856+pubnub-release-bot@users.noreply.github.com>
1 parent 9584344 commit 8adfccd

File tree

11 files changed

+42
-10
lines changed

11 files changed

+42
-10
lines changed

.pubnub.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
changelog:
3+
- date: 2023-08-21
4+
version: v7.3.1
5+
changes:
6+
- type: bug
7+
text: "Fixes issue of missing get and set methods for userId field of PubNub configuration."
38
- date: 2023-07-26
49
version: v7.3.0
510
changes:
@@ -880,7 +885,7 @@ supported-platforms:
880885
- 'Ubuntu 14.04 and up'
881886
- 'Windows 7 and up'
882887
version: 'Pubnub Javascript for Node'
883-
version: '7.3.0'
888+
version: '7.3.1'
884889
sdks:
885890
- full-name: PubNub Javascript SDK
886891
short-name: Javascript
@@ -896,7 +901,7 @@ sdks:
896901
- distribution-type: source
897902
distribution-repository: GitHub release
898903
package-name: pubnub.js
899-
location: https://github.com/pubnub/javascript/archive/refs/tags/v7.3.0.zip
904+
location: https://github.com/pubnub/javascript/archive/refs/tags/v7.3.1.zip
900905
requires:
901906
- name: 'agentkeepalive'
902907
min-version: '3.5.2'
@@ -1567,7 +1572,7 @@ sdks:
15671572
- distribution-type: library
15681573
distribution-repository: GitHub release
15691574
package-name: pubnub.js
1570-
location: https://github.com/pubnub/javascript/releases/download/v7.3.0/pubnub.7.3.0.js
1575+
location: https://github.com/pubnub/javascript/releases/download/v7.3.1/pubnub.7.3.1.js
15711576
requires:
15721577
- name: 'agentkeepalive'
15731578
min-version: '3.5.2'

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v7.3.1
2+
August 21 2023
3+
4+
#### Fixed
5+
- Fixes issue of missing get and set methods for userId field of PubNub configuration.
6+
17
## v7.3.0
28
July 26 2023
39

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ You will need the publish and subscribe keys to authenticate your app. Get your
2222
npm install pubnub
2323
```
2424
* or download one of our builds from our CDN:
25-
* https://cdn.pubnub.com/sdk/javascript/pubnub.7.3.0.js
26-
* https://cdn.pubnub.com/sdk/javascript/pubnub.7.3.0.min.js
25+
* https://cdn.pubnub.com/sdk/javascript/pubnub.7.3.1.js
26+
* https://cdn.pubnub.com/sdk/javascript/pubnub.7.3.1.min.js
2727
2828
2. Configure your keys:
2929

dist/web/pubnub.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@
768768
return this;
769769
};
770770
default_1.prototype.getVersion = function () {
771-
return '7.3.0';
771+
return '7.3.1';
772772
};
773773
default_1.prototype._addPnsdkSuffix = function (name, suffix) {
774774
this._PNSDKSuffix[name] = suffix;
@@ -7710,6 +7710,8 @@
77107710
this.setCipherKey = modules.config.setCipherKey.bind(modules.config);
77117711
this.getUUID = modules.config.getUUID.bind(modules.config);
77127712
this.setUUID = modules.config.setUUID.bind(modules.config);
7713+
this.getUserId = modules.config.getUserId.bind(modules.config);
7714+
this.setUserId = modules.config.setUserId.bind(modules.config);
77137715
this.getFilterExpression = modules.config.getFilterExpression.bind(modules.config);
77147716
this.setFilterExpression = modules.config.setFilterExpression.bind(modules.config);
77157717
this.setHeartbeatInterval = modules.config.setHeartbeatInterval.bind(modules.config);

dist/web/pubnub.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/core/components/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ var default_1 = /** @class */ (function () {
169169
return this;
170170
};
171171
default_1.prototype.getVersion = function () {
172-
return '7.3.0';
172+
return '7.3.1';
173173
};
174174
default_1.prototype._addPnsdkSuffix = function (name, suffix) {
175175
this._PNSDKSuffix[name] = suffix;

lib/core/pubnub-common.js

+2
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ var default_1 = /** @class */ (function () {
480480
this.setCipherKey = modules.config.setCipherKey.bind(modules.config);
481481
this.getUUID = modules.config.getUUID.bind(modules.config);
482482
this.setUUID = modules.config.setUUID.bind(modules.config);
483+
this.getUserId = modules.config.getUserId.bind(modules.config);
484+
this.setUserId = modules.config.setUserId.bind(modules.config);
483485
this.getFilterExpression = modules.config.getFilterExpression.bind(modules.config);
484486
this.setFilterExpression = modules.config.setFilterExpression.bind(modules.config);
485487
this.setHeartbeatInterval = modules.config.setHeartbeatInterval.bind(modules.config);

package.json

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

src/core/components/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export default class {
339339
}
340340

341341
getVersion() {
342-
return '7.3.0';
342+
return '7.3.1';
343343
}
344344

345345
_addPnsdkSuffix(name, suffix) {

src/core/pubnub-common.js

+6
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ export default class {
254254

255255
getUUID;
256256

257+
setUserId;
258+
259+
getUserId;
260+
257261
getFilterExpression;
258262

259263
setFilterExpression;
@@ -669,6 +673,8 @@ export default class {
669673
this.setCipherKey = modules.config.setCipherKey.bind(modules.config);
670674
this.getUUID = modules.config.getUUID.bind(modules.config);
671675
this.setUUID = modules.config.setUUID.bind(modules.config);
676+
this.getUserId = modules.config.getUserId.bind(modules.config);
677+
this.setUserId = modules.config.setUserId.bind(modules.config);
672678
this.getFilterExpression = modules.config.getFilterExpression.bind(modules.config);
673679
this.setFilterExpression = modules.config.setFilterExpression.bind(modules.config);
674680

test/integration/components/config.test.js

+11
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ describe('components/config', () => {
4242
assert.equal(pubnub.getUUID(), 'uuid2');
4343
});
4444

45+
it('get/set userId', () => {
46+
let pubnub = new PubNub({
47+
subscribeKey: 'mySubKey',
48+
publishKey: 'myPublishKey',
49+
userId: 'userId1',
50+
});
51+
assert.equal(pubnub.getUserId(), 'userId1');
52+
pubnub.setUserId('userId2');
53+
assert.equal(pubnub.getUserId(), 'userId2');
54+
});
55+
4556
it('throws when both userId and uuid are provided', () => {
4657
let config = { subscribeKey: 'demo', publishKey: 'demo', uuid: 'myUuid', userId: 'myUserId' };
4758

0 commit comments

Comments
 (0)