Skip to content

Commit e4bb7d4

Browse files
author
Devendra
committed
fix for the issue where auth key was not being sent with few requests
1 parent 967d985 commit e4bb7d4

File tree

22 files changed

+340
-298
lines changed

22 files changed

+340
-298
lines changed

core/pubnub-common.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,7 @@ function PN_API(setup) {
11601160
if (noheresync) return;
11611161
SELF['here_now']({
11621162
'channel' : channel,
1163+
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
11631164
'callback' : function(here) {
11641165
each( 'uuids' in here ? here['uuids'] : [],
11651166
function(uid) { presence( {
@@ -1198,7 +1199,8 @@ function PN_API(setup) {
11981199
SELF['subscribe']({
11991200
'channel_group' : channel_group + PRESENCE_SUFFIX,
12001201
'callback' : presence,
1201-
'restore' : restore
1202+
'restore' : restore,
1203+
'auth_key' : auth_key
12021204
});
12031205

12041206
// Presence Subscribed?
@@ -1208,6 +1210,7 @@ function PN_API(setup) {
12081210
if (noheresync) return;
12091211
SELF['here_now']({
12101212
'channel_group' : channel_group,
1213+
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
12111214
'callback' : function(here) {
12121215
each( 'uuids' in here ? here['uuids'] : [],
12131216
function(uid) { presence( {

modern/pubnub.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,7 @@ function PN_API(setup) {
11611161
if (noheresync) return;
11621162
SELF['here_now']({
11631163
'channel' : channel,
1164+
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
11641165
'callback' : function(here) {
11651166
each( 'uuids' in here ? here['uuids'] : [],
11661167
function(uid) { presence( {
@@ -1199,7 +1200,8 @@ function PN_API(setup) {
11991200
SELF['subscribe']({
12001201
'channel_group' : channel_group + PRESENCE_SUFFIX,
12011202
'callback' : presence,
1202-
'restore' : restore
1203+
'restore' : restore,
1204+
'auth_key' : auth_key
12031205
});
12041206

12051207
// Presence Subscribed?
@@ -1209,6 +1211,7 @@ function PN_API(setup) {
12091211
if (noheresync) return;
12101212
SELF['here_now']({
12111213
'channel_group' : channel_group,
1214+
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
12121215
'callback' : function(here) {
12131216
each( 'uuids' in here ? here['uuids'] : [],
12141217
function(uid) { presence( {

modern/pubnub.min.js

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

node.js/pubnub.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,7 @@ function PN_API(setup) {
11611161
if (noheresync) return;
11621162
SELF['here_now']({
11631163
'channel' : channel,
1164+
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
11641165
'callback' : function(here) {
11651166
each( 'uuids' in here ? here['uuids'] : [],
11661167
function(uid) { presence( {
@@ -1199,7 +1200,8 @@ function PN_API(setup) {
11991200
SELF['subscribe']({
12001201
'channel_group' : channel_group + PRESENCE_SUFFIX,
12011202
'callback' : presence,
1202-
'restore' : restore
1203+
'restore' : restore,
1204+
'auth_key' : auth_key
12031205
});
12041206

12051207
// Presence Subscribed?
@@ -1209,6 +1211,7 @@ function PN_API(setup) {
12091211
if (noheresync) return;
12101212
SELF['here_now']({
12111213
'channel_group' : channel_group,
1214+
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
12121215
'callback' : function(here) {
12131216
each( 'uuids' in here ? here['uuids'] : [],
12141217
function(uid) { presence( {

phonegap/pubnub.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,7 @@ function PN_API(setup) {
11611161
if (noheresync) return;
11621162
SELF['here_now']({
11631163
'channel' : channel,
1164+
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
11641165
'callback' : function(here) {
11651166
each( 'uuids' in here ? here['uuids'] : [],
11661167
function(uid) { presence( {
@@ -1199,7 +1200,8 @@ function PN_API(setup) {
11991200
SELF['subscribe']({
12001201
'channel_group' : channel_group + PRESENCE_SUFFIX,
12011202
'callback' : presence,
1202-
'restore' : restore
1203+
'restore' : restore,
1204+
'auth_key' : auth_key
12031205
});
12041206

12051207
// Presence Subscribed?
@@ -1209,6 +1211,7 @@ function PN_API(setup) {
12091211
if (noheresync) return;
12101212
SELF['here_now']({
12111213
'channel_group' : channel_group,
1214+
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
12121215
'callback' : function(here) {
12131216
each( 'uuids' in here ? here['uuids'] : [],
12141217
function(uid) { presence( {

0 commit comments

Comments
 (0)