stream-chat 8.13.1 → 8.14.0
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 +3 -57
- 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 +2 -57
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +3 -57
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -57
- 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/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/events.ts +0 -25
package/dist/index.es.js
CHANGED
|
@@ -1361,12 +1361,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1361
1361
|
* Static state indicates that channel exists on backend, but is not being watched yet.
|
|
1362
1362
|
*/
|
|
1363
1363
|
|
|
1364
|
-
/**
|
|
1365
|
-
* Collects the incoming WS events before the channel is marked as initialized.
|
|
1366
|
-
* This prevents executing procedures that depend on channel being initialized.
|
|
1367
|
-
* Once the channel is marked as initialized the queue is flushed.
|
|
1368
|
-
*/
|
|
1369
|
-
|
|
1370
1364
|
/**
|
|
1371
1365
|
* constructor - Create a channel
|
|
1372
1366
|
*
|
|
@@ -1410,8 +1404,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1410
1404
|
|
|
1411
1405
|
_defineProperty(this, "disconnected", void 0);
|
|
1412
1406
|
|
|
1413
|
-
_defineProperty(this, "wsEventQueue", void 0);
|
|
1414
|
-
|
|
1415
1407
|
_defineProperty(this, "create", /*#__PURE__*/function () {
|
|
1416
1408
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
1417
1409
|
var defaultOptions;
|
|
@@ -1501,7 +1493,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1501
1493
|
this.lastTypingEvent = null;
|
|
1502
1494
|
this.isTyping = false;
|
|
1503
1495
|
this.disconnected = false;
|
|
1504
|
-
this.wsEventQueue = [];
|
|
1505
1496
|
}
|
|
1506
1497
|
/**
|
|
1507
1498
|
* getClient - Get the chat client for this channel. If client.disconnect() was called, this function will error
|
|
@@ -2905,9 +2896,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2905
2896
|
case 7:
|
|
2906
2897
|
state = _context28.sent;
|
|
2907
2898
|
this.initialized = true;
|
|
2908
|
-
|
|
2909
|
-
this._flushWsEventQueue();
|
|
2910
|
-
|
|
2911
2899
|
this.data = state.channel;
|
|
2912
2900
|
|
|
2913
2901
|
this._client.logger('info', "channel:watch() - started watching channel ".concat(this.cid), {
|
|
@@ -2917,7 +2905,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2917
2905
|
|
|
2918
2906
|
return _context28.abrupt("return", state);
|
|
2919
2907
|
|
|
2920
|
-
case
|
|
2908
|
+
case 12:
|
|
2921
2909
|
case "end":
|
|
2922
2910
|
return _context28.stop();
|
|
2923
2911
|
}
|
|
@@ -3640,11 +3628,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3640
3628
|
|
|
3641
3629
|
var channel = this;
|
|
3642
3630
|
|
|
3643
|
-
if (!this._isInitialized()) {
|
|
3644
|
-
this.wsEventQueue.push(event);
|
|
3645
|
-
return;
|
|
3646
|
-
}
|
|
3647
|
-
|
|
3648
3631
|
this._client.logger('info', "channel:_handleChannelEvent - Received event of type { ".concat(event.type, " } on ").concat(this.cid), {
|
|
3649
3632
|
tags: ['event', 'channel'],
|
|
3650
3633
|
channel: this
|
|
@@ -3895,11 +3878,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3895
3878
|
channel.state.watcher_count = event.watcher_count;
|
|
3896
3879
|
}
|
|
3897
3880
|
}
|
|
3898
|
-
}, {
|
|
3899
|
-
key: "_isInitialized",
|
|
3900
|
-
value: function _isInitialized() {
|
|
3901
|
-
return this.initialized || this.offlineMode || this.getClient()._isUsingServerAuth();
|
|
3902
|
-
}
|
|
3903
3881
|
}, {
|
|
3904
3882
|
key: "_checkInitialized",
|
|
3905
3883
|
value: function _checkInitialized() {
|
|
@@ -4061,14 +4039,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4061
4039
|
this.disconnected = true;
|
|
4062
4040
|
this.state.setIsUpToDate(false);
|
|
4063
4041
|
}
|
|
4064
|
-
}, {
|
|
4065
|
-
key: "_flushWsEventQueue",
|
|
4066
|
-
value: function _flushWsEventQueue() {
|
|
4067
|
-
while (this.wsEventQueue.length) {
|
|
4068
|
-
var event = this.wsEventQueue.shift();
|
|
4069
|
-
if (event) this.getClient().dispatchEvent(event);
|
|
4070
|
-
}
|
|
4071
|
-
}
|
|
4072
4042
|
}]);
|
|
4073
4043
|
|
|
4074
4044
|
return Channel;
|
|
@@ -10164,7 +10134,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10164
10134
|
}, {
|
|
10165
10135
|
key: "getUserAgent",
|
|
10166
10136
|
value: function getUserAgent() {
|
|
10167
|
-
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.0");
|
|
10168
10138
|
}
|
|
10169
10139
|
}, {
|
|
10170
10140
|
key: "setUserAgent",
|
|
@@ -11558,30 +11528,6 @@ var EVENT_MAP = {
|
|
|
11558
11528
|
'connection.changed': true,
|
|
11559
11529
|
'connection.recovered': true,
|
|
11560
11530
|
'transport.changed': true
|
|
11561
|
-
}; // events handled by channel._handleChannelEvent
|
|
11562
|
-
|
|
11563
|
-
var CHANNEL_HANDLED_EVENTS = {
|
|
11564
|
-
'typing.start': true,
|
|
11565
|
-
'typing.stop': true,
|
|
11566
|
-
'message.read': true,
|
|
11567
|
-
'user.watching.start': true,
|
|
11568
|
-
'user.updated': true,
|
|
11569
|
-
'user.watching.stop': true,
|
|
11570
|
-
'message.deleted': true,
|
|
11571
|
-
'message.new': true,
|
|
11572
|
-
'message.updated': true,
|
|
11573
|
-
'channel.truncated': true,
|
|
11574
|
-
'member.added': true,
|
|
11575
|
-
'member.updated': true,
|
|
11576
|
-
'member.removed': true,
|
|
11577
|
-
'channel.updated': true,
|
|
11578
|
-
'reaction.new': true,
|
|
11579
|
-
'reaction.deleted': true,
|
|
11580
|
-
'reaction.updated': true,
|
|
11581
|
-
'channel.hidden': true,
|
|
11582
|
-
'channel.visible': true,
|
|
11583
|
-
'user.banned': true,
|
|
11584
|
-
'user.unbanned': true
|
|
11585
11531
|
};
|
|
11586
11532
|
|
|
11587
11533
|
var Allow = 'Allow';
|
|
@@ -11658,5 +11604,5 @@ var BuiltinPermissions = {
|
|
|
11658
11604
|
UseFrozenChannel: 'Send messages and reactions to frozen channels'
|
|
11659
11605
|
};
|
|
11660
11606
|
|
|
11661
|
-
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 };
|
|
11662
11608
|
//# sourceMappingURL=index.es.js.map
|