Skip to content

Commit

Permalink
fix for the issue where auth key was not being sent with few requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Devendra committed Mar 12, 2015
1 parent 967d985 commit e4bb7d4
Show file tree
Hide file tree
Showing 22 changed files with 340 additions and 298 deletions.
5 changes: 4 additions & 1 deletion core/pubnub-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,7 @@ function PN_API(setup) {
if (noheresync) return;
SELF['here_now']({
'channel' : channel,
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
'callback' : function(here) {
each( 'uuids' in here ? here['uuids'] : [],
function(uid) { presence( {
Expand Down Expand Up @@ -1198,7 +1199,8 @@ function PN_API(setup) {
SELF['subscribe']({
'channel_group' : channel_group + PRESENCE_SUFFIX,
'callback' : presence,
'restore' : restore
'restore' : restore,
'auth_key' : auth_key
});

// Presence Subscribed?
Expand All @@ -1208,6 +1210,7 @@ function PN_API(setup) {
if (noheresync) return;
SELF['here_now']({
'channel_group' : channel_group,
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
'callback' : function(here) {
each( 'uuids' in here ? here['uuids'] : [],
function(uid) { presence( {
Expand Down
5 changes: 4 additions & 1 deletion modern/pubnub.js
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ function PN_API(setup) {
if (noheresync) return;
SELF['here_now']({
'channel' : channel,
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
'callback' : function(here) {
each( 'uuids' in here ? here['uuids'] : [],
function(uid) { presence( {
Expand Down Expand Up @@ -1199,7 +1200,8 @@ function PN_API(setup) {
SELF['subscribe']({
'channel_group' : channel_group + PRESENCE_SUFFIX,
'callback' : presence,
'restore' : restore
'restore' : restore,
'auth_key' : auth_key
});

// Presence Subscribed?
Expand All @@ -1209,6 +1211,7 @@ function PN_API(setup) {
if (noheresync) return;
SELF['here_now']({
'channel_group' : channel_group,
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
'callback' : function(here) {
each( 'uuids' in here ? here['uuids'] : [],
function(uid) { presence( {
Expand Down
60 changes: 30 additions & 30 deletions modern/pubnub.min.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion node.js/pubnub.js
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ function PN_API(setup) {
if (noheresync) return;
SELF['here_now']({
'channel' : channel,
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
'callback' : function(here) {
each( 'uuids' in here ? here['uuids'] : [],
function(uid) { presence( {
Expand Down Expand Up @@ -1199,7 +1200,8 @@ function PN_API(setup) {
SELF['subscribe']({
'channel_group' : channel_group + PRESENCE_SUFFIX,
'callback' : presence,
'restore' : restore
'restore' : restore,
'auth_key' : auth_key
});

// Presence Subscribed?
Expand All @@ -1209,6 +1211,7 @@ function PN_API(setup) {
if (noheresync) return;
SELF['here_now']({
'channel_group' : channel_group,
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
'callback' : function(here) {
each( 'uuids' in here ? here['uuids'] : [],
function(uid) { presence( {
Expand Down
5 changes: 4 additions & 1 deletion phonegap/pubnub.js
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ function PN_API(setup) {
if (noheresync) return;
SELF['here_now']({
'channel' : channel,
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
'callback' : function(here) {
each( 'uuids' in here ? here['uuids'] : [],
function(uid) { presence( {
Expand Down Expand Up @@ -1199,7 +1200,8 @@ function PN_API(setup) {
SELF['subscribe']({
'channel_group' : channel_group + PRESENCE_SUFFIX,
'callback' : presence,
'restore' : restore
'restore' : restore,
'auth_key' : auth_key
});

// Presence Subscribed?
Expand All @@ -1209,6 +1211,7 @@ function PN_API(setup) {
if (noheresync) return;
SELF['here_now']({
'channel_group' : channel_group,
'data' : _get_url_params({ 'uuid' : UUID, 'auth' : auth_key }),
'callback' : function(here) {
each( 'uuids' in here ? here['uuids'] : [],
function(uid) { presence( {
Expand Down
Loading

0 comments on commit e4bb7d4

Please sign in to comment.