stream-chat 8.13.1 → 8.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.es.js +7 -58
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +6 -58
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +7 -58
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +6 -58
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +0 -8
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/events.d.ts +0 -23
- package/dist/types/events.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/channel.ts +0 -25
- package/src/client.ts +4 -2
- package/src/events.ts +0 -25
package/dist/browser.es.js
CHANGED
|
@@ -1360,12 +1360,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1360
1360
|
* Static state indicates that channel exists on backend, but is not being watched yet.
|
|
1361
1361
|
*/
|
|
1362
1362
|
|
|
1363
|
-
/**
|
|
1364
|
-
* Collects the incoming WS events before the channel is marked as initialized.
|
|
1365
|
-
* This prevents executing procedures that depend on channel being initialized.
|
|
1366
|
-
* Once the channel is marked as initialized the queue is flushed.
|
|
1367
|
-
*/
|
|
1368
|
-
|
|
1369
1363
|
/**
|
|
1370
1364
|
* constructor - Create a channel
|
|
1371
1365
|
*
|
|
@@ -1409,8 +1403,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1409
1403
|
|
|
1410
1404
|
_defineProperty(this, "disconnected", void 0);
|
|
1411
1405
|
|
|
1412
|
-
_defineProperty(this, "wsEventQueue", void 0);
|
|
1413
|
-
|
|
1414
1406
|
_defineProperty(this, "create", /*#__PURE__*/function () {
|
|
1415
1407
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
1416
1408
|
var defaultOptions;
|
|
@@ -1500,7 +1492,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1500
1492
|
this.lastTypingEvent = null;
|
|
1501
1493
|
this.isTyping = false;
|
|
1502
1494
|
this.disconnected = false;
|
|
1503
|
-
this.wsEventQueue = [];
|
|
1504
1495
|
}
|
|
1505
1496
|
/**
|
|
1506
1497
|
* getClient - Get the chat client for this channel. If client.disconnect() was called, this function will error
|
|
@@ -2904,9 +2895,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2904
2895
|
case 7:
|
|
2905
2896
|
state = _context28.sent;
|
|
2906
2897
|
this.initialized = true;
|
|
2907
|
-
|
|
2908
|
-
this._flushWsEventQueue();
|
|
2909
|
-
|
|
2910
2898
|
this.data = state.channel;
|
|
2911
2899
|
|
|
2912
2900
|
this._client.logger('info', "channel:watch() - started watching channel ".concat(this.cid), {
|
|
@@ -2916,7 +2904,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2916
2904
|
|
|
2917
2905
|
return _context28.abrupt("return", state);
|
|
2918
2906
|
|
|
2919
|
-
case
|
|
2907
|
+
case 12:
|
|
2920
2908
|
case "end":
|
|
2921
2909
|
return _context28.stop();
|
|
2922
2910
|
}
|
|
@@ -3639,11 +3627,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3639
3627
|
|
|
3640
3628
|
var channel = this;
|
|
3641
3629
|
|
|
3642
|
-
if (!this._isInitialized()) {
|
|
3643
|
-
this.wsEventQueue.push(event);
|
|
3644
|
-
return;
|
|
3645
|
-
}
|
|
3646
|
-
|
|
3647
3630
|
this._client.logger('info', "channel:_handleChannelEvent - Received event of type { ".concat(event.type, " } on ").concat(this.cid), {
|
|
3648
3631
|
tags: ['event', 'channel'],
|
|
3649
3632
|
channel: this
|
|
@@ -3894,11 +3877,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3894
3877
|
channel.state.watcher_count = event.watcher_count;
|
|
3895
3878
|
}
|
|
3896
3879
|
}
|
|
3897
|
-
}, {
|
|
3898
|
-
key: "_isInitialized",
|
|
3899
|
-
value: function _isInitialized() {
|
|
3900
|
-
return this.initialized || this.offlineMode || this.getClient()._isUsingServerAuth();
|
|
3901
|
-
}
|
|
3902
3880
|
}, {
|
|
3903
3881
|
key: "_checkInitialized",
|
|
3904
3882
|
value: function _checkInitialized() {
|
|
@@ -4060,14 +4038,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4060
4038
|
this.disconnected = true;
|
|
4061
4039
|
this.state.setIsUpToDate(false);
|
|
4062
4040
|
}
|
|
4063
|
-
}, {
|
|
4064
|
-
key: "_flushWsEventQueue",
|
|
4065
|
-
value: function _flushWsEventQueue() {
|
|
4066
|
-
while (this.wsEventQueue.length) {
|
|
4067
|
-
var event = this.wsEventQueue.shift();
|
|
4068
|
-
if (event) this.getClient().dispatchEvent(event);
|
|
4069
|
-
}
|
|
4070
|
-
}
|
|
4071
4041
|
}]);
|
|
4072
4042
|
|
|
4073
4043
|
return Channel;
|
|
@@ -6639,7 +6609,6 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6639
6609
|
|
|
6640
6610
|
for (var _channelID in refMap) {
|
|
6641
6611
|
var _channel2 = _this.activeChannels[_channelID];
|
|
6642
|
-
/** search the members and watchers and update as needed... */
|
|
6643
6612
|
|
|
6644
6613
|
if (_channel2 !== null && _channel2 !== void 0 && _channel2.state) {
|
|
6645
6614
|
if (_channel2.state.members[user.id]) {
|
|
@@ -6649,6 +6618,10 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
6649
6618
|
if (_channel2.state.watchers[user.id]) {
|
|
6650
6619
|
_channel2.state.watchers[user.id] = user;
|
|
6651
6620
|
}
|
|
6621
|
+
|
|
6622
|
+
if (_channel2.state.read[user.id]) {
|
|
6623
|
+
_channel2.state.read[user.id].user = user;
|
|
6624
|
+
}
|
|
6652
6625
|
}
|
|
6653
6626
|
}
|
|
6654
6627
|
});
|
|
@@ -10161,7 +10134,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10161
10134
|
}, {
|
|
10162
10135
|
key: "getUserAgent",
|
|
10163
10136
|
value: function getUserAgent() {
|
|
10164
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10137
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.14.1");
|
|
10165
10138
|
}
|
|
10166
10139
|
}, {
|
|
10167
10140
|
key: "setUserAgent",
|
|
@@ -11555,30 +11528,6 @@ var EVENT_MAP = {
|
|
|
11555
11528
|
'connection.changed': true,
|
|
11556
11529
|
'connection.recovered': true,
|
|
11557
11530
|
'transport.changed': true
|
|
11558
|
-
}; // events handled by channel._handleChannelEvent
|
|
11559
|
-
|
|
11560
|
-
var CHANNEL_HANDLED_EVENTS = {
|
|
11561
|
-
'typing.start': true,
|
|
11562
|
-
'typing.stop': true,
|
|
11563
|
-
'message.read': true,
|
|
11564
|
-
'user.watching.start': true,
|
|
11565
|
-
'user.updated': true,
|
|
11566
|
-
'user.watching.stop': true,
|
|
11567
|
-
'message.deleted': true,
|
|
11568
|
-
'message.new': true,
|
|
11569
|
-
'message.updated': true,
|
|
11570
|
-
'channel.truncated': true,
|
|
11571
|
-
'member.added': true,
|
|
11572
|
-
'member.updated': true,
|
|
11573
|
-
'member.removed': true,
|
|
11574
|
-
'channel.updated': true,
|
|
11575
|
-
'reaction.new': true,
|
|
11576
|
-
'reaction.deleted': true,
|
|
11577
|
-
'reaction.updated': true,
|
|
11578
|
-
'channel.hidden': true,
|
|
11579
|
-
'channel.visible': true,
|
|
11580
|
-
'user.banned': true,
|
|
11581
|
-
'user.unbanned': true
|
|
11582
11531
|
};
|
|
11583
11532
|
|
|
11584
11533
|
var Allow = 'Allow';
|
|
@@ -11655,5 +11604,5 @@ var BuiltinPermissions = {
|
|
|
11655
11604
|
UseFrozenChannel: 'Send messages and reactions to frozen channels'
|
|
11656
11605
|
};
|
|
11657
11606
|
|
|
11658
|
-
export { Allow, AllowAll, AnyResource, AnyRole, BuiltinPermissions, BuiltinRoles,
|
|
11607
|
+
export { Allow, AllowAll, AnyResource, AnyRole, BuiltinPermissions, BuiltinRoles, Channel, ChannelState, CheckSignature, ClientState, Deny, DenyAll, DevToken, EVENT_MAP, ErrorFromResponse, InsightMetrics, JWTServerToken, JWTUserToken, MaxPriority, MinPriority, Permission, StableWSConnection, StreamChat, TokenManager, UserFromToken, buildWsFatalInsight, buildWsSuccessAfterFailureInsight, chatCodes, decodeBase64, encodeBase64, isOwnUser, logChatPromiseExecution, postInsights };
|
|
11659
11608
|
//# sourceMappingURL=browser.es.js.map
|