Skip to content

Commit 47ece16

Browse files
author
Devendra
committed
fix for grant signature mismatch due to variable scoping bug
1 parent fda51ee commit 47ece16

File tree

23 files changed

+438
-407
lines changed

23 files changed

+438
-407
lines changed

core/pubnub-common.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,7 @@ function PN_API(setup) {
990990
, store = ('store_in_history' in args) ? args['store_in_history']: true
991991
, jsonp = jsonp_cb()
992992
, add_msg = 'push'
993+
, params
993994
, url;
994995

995996
if (args['prepend']) add_msg = 'unshift'
@@ -1754,6 +1755,7 @@ function PN_API(setup) {
17541755
, op = args['op']
17551756
, gw_type = args['gw_type']
17561757
, device_id = args['device_id']
1758+
, params
17571759
, url;
17581760

17591761
if (!device_id) return error('Missing Device ID (device_id)');

modern/pubnub.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@ function PN_API(setup) {
991991
, store = ('store_in_history' in args) ? args['store_in_history']: true
992992
, jsonp = jsonp_cb()
993993
, add_msg = 'push'
994+
, params
994995
, url;
995996

996997
if (args['prepend']) add_msg = 'unshift'
@@ -1755,6 +1756,7 @@ function PN_API(setup) {
17551756
, op = args['op']
17561757
, gw_type = args['gw_type']
17571758
, device_id = args['device_id']
1759+
, params
17581760
, url;
17591761

17601762
if (!device_id) return error('Missing Device ID (device_id)');

modern/pubnub.min.js

Lines changed: 49 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node.js/examples/hello.js

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,26 @@
55
66
--------------------------------------------------------------------------- */
77

8-
var PUBNUB = require("../pubnub.js")
8+
var pubnub = require("../pubnub.js")
99

10-
var pubnub = PUBNUB({
11-
publish_key : "demo",
12-
subscribe_key : "demo"
13-
//cipher_key : "demo"
10+
var p = pubnub.init({
11+
"subscribe_key" : "new-pam",
12+
"publish_key" : "new-pam",
13+
"secret_key" : "new-pam",
14+
"params" : {},
1415
});
1516

16-
pubnub.publish({
17-
post: false,
18-
channel : 'PubNubTest_RX',
19-
message : { 'test' : 'f?ds' },
20-
callback : function(details) {
21-
var success = details[0]
22-
, response = details[1];
17+
p.publish({
18+
"message" : "foo",
19+
"channel" : "bar",
20+
});
2321

24-
if (success) console.log( "Success!", response );
25-
if (!success) console.log( "Fail!", response );
26-
}
22+
p.publish({
23+
"message" : "foo",
24+
"channel" : "bar",
2725
});
26+
27+
p.grant({
28+
"callback" : function (m) { console.log(m); },
29+
"error" : function (e) { console.error(e); },
30+
});

node.js/pubnub.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@ function PN_API(setup) {
991991
, store = ('store_in_history' in args) ? args['store_in_history']: true
992992
, jsonp = jsonp_cb()
993993
, add_msg = 'push'
994+
, params
994995
, url;
995996

996997
if (args['prepend']) add_msg = 'unshift'
@@ -1755,6 +1756,7 @@ function PN_API(setup) {
17551756
, op = args['op']
17561757
, gw_type = args['gw_type']
17571758
, device_id = args['device_id']
1759+
, params
17581760
, url;
17591761

17601762
if (!device_id) return error('Missing Device ID (device_id)');

phonegap/pubnub.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@ function PN_API(setup) {
991991
, store = ('store_in_history' in args) ? args['store_in_history']: true
992992
, jsonp = jsonp_cb()
993993
, add_msg = 'push'
994+
, params
994995
, url;
995996

996997
if (args['prepend']) add_msg = 'unshift'
@@ -1755,6 +1756,7 @@ function PN_API(setup) {
17551756
, op = args['op']
17561757
, gw_type = args['gw_type']
17571758
, device_id = args['device_id']
1759+
, params
17581760
, url;
17591761

17601762
if (!device_id) return error('Missing Device ID (device_id)');

phonegap/pubnub.min.js

Lines changed: 49 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sencha/pubnub.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@ function PN_API(setup) {
991991
, store = ('store_in_history' in args) ? args['store_in_history']: true
992992
, jsonp = jsonp_cb()
993993
, add_msg = 'push'
994+
, params
994995
, url;
995996

996997
if (args['prepend']) add_msg = 'unshift'
@@ -1755,6 +1756,7 @@ function PN_API(setup) {
17551756
, op = args['op']
17561757
, gw_type = args['gw_type']
17571758
, device_id = args['device_id']
1759+
, params
17581760
, url;
17591761

17601762
if (!device_id) return error('Missing Device ID (device_id)');

sencha/pubnub.min.js

Lines changed: 49 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

smart-tv/pubnub.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,7 @@ function PN_API(setup) {
11411141
, store = ('store_in_history' in args) ? args['store_in_history']: true
11421142
, jsonp = jsonp_cb()
11431143
, add_msg = 'push'
1144+
, params
11441145
, url;
11451146

11461147
if (args['prepend']) add_msg = 'unshift'
@@ -1905,6 +1906,7 @@ function PN_API(setup) {
19051906
, op = args['op']
19061907
, gw_type = args['gw_type']
19071908
, device_id = args['device_id']
1909+
, params
19081910
, url;
19091911

19101912
if (!device_id) return error('Missing Device ID (device_id)');

0 commit comments

Comments
 (0)