Skip to content

Commit f750071

Browse files
jzucker2Max Presman
authored andcommitted
add compiled files
1 parent 16e1440 commit f750071

File tree

5 files changed

+45
-17
lines changed

5 files changed

+45
-17
lines changed

dist/web/pubnub.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,9 @@ return /******/ (function(modules) { // webpackBootstrap
15351535
this._pendingChannelSubscriptions = [];
15361536
this._pendingChannelGroupSubscriptions = [];
15371537

1538-
this._timetoken = 0;
1538+
this._currentTimetoken = 0;
1539+
this._lastTimetoken = 0;
1540+
15391541
this._subscriptionStatusAnnounced = false;
15401542

15411543
this._reconnectionManager = new _reconnection_manager2.default({ timeEndpoint: timeEndpoint });
@@ -1582,7 +1584,10 @@ return /******/ (function(modules) { // webpackBootstrap
15821584
return;
15831585
}
15841586

1585-
if (timetoken) this._timetoken = timetoken;
1587+
if (timetoken) {
1588+
this._lastTimetoken = this._currentTimetoken;
1589+
this._currentTimetoken = timetoken;
1590+
}
15861591

15871592
channels.forEach(function (channel) {
15881593
_this2._channels[channel] = { state: {} };
@@ -1626,12 +1631,15 @@ return /******/ (function(modules) { // webpackBootstrap
16261631
this._leaveEndpoint({ channels: channels, channelGroups: channelGroups }, function (status) {
16271632
status.affectedChannels = channels;
16281633
status.affectedChannelGroups = channelGroups;
1634+
status.currentTimetoken = _this3._currentTimetoken;
1635+
status.lastTimetoken = _this3._lastTimetoken;
16291636
_this3._listenerManager.announceStatus(status);
16301637
});
16311638
}
16321639

16331640
if (Object.keys(this._channels).length === 0 && Object.keys(this._presenceChannels).length === 0 && Object.keys(this._channelGroups).length === 0 && Object.keys(this._presenceChannelGroups).length === 0) {
1634-
this._timetoken = 0;
1641+
this._lastTimetoken = 0;
1642+
this._currentTimetoken = 0;
16351643
this._region = null;
16361644
this._reconnectionManager.stopPolling();
16371645
}
@@ -1747,7 +1755,7 @@ return /******/ (function(modules) { // webpackBootstrap
17471755
var subscribeArgs = {
17481756
channels: channels,
17491757
channelGroups: channelGroups,
1750-
timetoken: this._timetoken,
1758+
timetoken: this._currentTimetoken,
17511759
filterExpression: this._config.filterExpression,
17521760
region: this._region
17531761
};
@@ -1769,7 +1777,9 @@ return /******/ (function(modules) { // webpackBootstrap
17691777
_this5._subscriptionStatusAnnounced = true;
17701778
var reconnectedAnnounce = {
17711779
category: _categories2.default.PNReconnectedCategory,
1772-
operation: status.operation
1780+
operation: status.operation,
1781+
lastTimetoken: _this5._lastTimetoken,
1782+
currentTimetoken: _this5._currentTimetoken
17731783
};
17741784
_this5._listenerManager.announceStatus(reconnectedAnnounce);
17751785
});
@@ -1782,12 +1792,17 @@ return /******/ (function(modules) { // webpackBootstrap
17821792
return;
17831793
}
17841794

1795+
this._lastTimetoken = this._currentTimetoken;
1796+
this._currentTimetoken = payload.metadata.timetoken;
1797+
17851798
if (!this._subscriptionStatusAnnounced) {
17861799
var connectedAnnounce = {};
17871800
connectedAnnounce.category = _categories2.default.PNConnectedCategory;
17881801
connectedAnnounce.operation = status.operation;
17891802
connectedAnnounce.affectedChannels = this._pendingChannelSubscriptions;
17901803
connectedAnnounce.affectedChannelGroups = this._pendingChannelGroupSubscriptions;
1804+
connectedAnnounce.lastTimetoken = this._lastTimetoken;
1805+
connectedAnnounce.currentTimetoken = this._currentTimetoken;
17911806
this._subscriptionStatusAnnounced = true;
17921807
this._listenerManager.announceStatus(connectedAnnounce);
17931808

@@ -1873,7 +1888,6 @@ return /******/ (function(modules) { // webpackBootstrap
18731888
});
18741889

18751890
this._region = payload.metadata.region;
1876-
this._timetoken = payload.metadata.timetoken;
18771891
this._startSubscribeLoop();
18781892
}
18791893
}, {

dist/web/pubnub.min.js

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

lib/core/components/subscription_manager.js

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

lib/core/components/subscription_manager.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)