Skip to content

Commit bc885cb

Browse files
author
Devendra
committed
fix for issue when channel and subscribed channel can be different
1 parent b1898e2 commit bc885cb

File tree

22 files changed

+44
-30
lines changed

22 files changed

+44
-30
lines changed

core/pubnub-common.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,8 +1313,9 @@ function PN_API(setup) {
13131313
return function() {
13141314
var channel = list.shift()||SUB_CHANNEL;
13151315
var channel2 = list2.shift();
1316+
13161317
var r = [
1317-
(CHANNELS[channel]||{})
1318+
(CHANNELS[channel2 || channel]||{})
13181319
.callback||SUB_CALLBACK,
13191320
channel.split(PRESENCE_SUFFIX)[0]
13201321
];

modern/pubnub.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,9 @@ function PN_API(setup) {
13141314
return function() {
13151315
var channel = list.shift()||SUB_CHANNEL;
13161316
var channel2 = list2.shift();
1317+
13171318
var r = [
1318-
(CHANNELS[channel]||{})
1319+
(CHANNELS[channel2 || channel]||{})
13191320
.callback||SUB_CALLBACK,
13201321
channel.split(PRESENCE_SUFFIX)[0]
13211322
];

modern/pubnub.min.js

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

node.js/pubnub.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,9 @@ function PN_API(setup) {
13141314
return function() {
13151315
var channel = list.shift()||SUB_CHANNEL;
13161316
var channel2 = list2.shift();
1317+
13171318
var r = [
1318-
(CHANNELS[channel]||{})
1319+
(CHANNELS[channel2 || channel]||{})
13191320
.callback||SUB_CALLBACK,
13201321
channel.split(PRESENCE_SUFFIX)[0]
13211322
];

phonegap/pubnub.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,9 @@ function PN_API(setup) {
13141314
return function() {
13151315
var channel = list.shift()||SUB_CHANNEL;
13161316
var channel2 = list2.shift();
1317+
13171318
var r = [
1318-
(CHANNELS[channel]||{})
1319+
(CHANNELS[channel2 || channel]||{})
13191320
.callback||SUB_CALLBACK,
13201321
channel.split(PRESENCE_SUFFIX)[0]
13211322
];

phonegap/pubnub.min.js

Lines changed: 2 additions & 2 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,9 @@ function PN_API(setup) {
13141314
return function() {
13151315
var channel = list.shift()||SUB_CHANNEL;
13161316
var channel2 = list2.shift();
1317+
13171318
var r = [
1318-
(CHANNELS[channel]||{})
1319+
(CHANNELS[channel2 || channel]||{})
13191320
.callback||SUB_CALLBACK,
13201321
channel.split(PRESENCE_SUFFIX)[0]
13211322
];

sencha/pubnub.min.js

Lines changed: 2 additions & 2 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1464,8 +1464,9 @@ function PN_API(setup) {
14641464
return function() {
14651465
var channel = list.shift()||SUB_CHANNEL;
14661466
var channel2 = list2.shift();
1467+
14671468
var r = [
1468-
(CHANNELS[channel]||{})
1469+
(CHANNELS[channel2 || channel]||{})
14691470
.callback||SUB_CALLBACK,
14701471
channel.split(PRESENCE_SUFFIX)[0]
14711472
];

0 commit comments

Comments
 (0)