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.js
CHANGED
|
@@ -1389,12 +1389,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1389
1389
|
* Static state indicates that channel exists on backend, but is not being watched yet.
|
|
1390
1390
|
*/
|
|
1391
1391
|
|
|
1392
|
-
/**
|
|
1393
|
-
* Collects the incoming WS events before the channel is marked as initialized.
|
|
1394
|
-
* This prevents executing procedures that depend on channel being initialized.
|
|
1395
|
-
* Once the channel is marked as initialized the queue is flushed.
|
|
1396
|
-
*/
|
|
1397
|
-
|
|
1398
1392
|
/**
|
|
1399
1393
|
* constructor - Create a channel
|
|
1400
1394
|
*
|
|
@@ -1438,8 +1432,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1438
1432
|
|
|
1439
1433
|
_defineProperty__default['default'](this, "disconnected", void 0);
|
|
1440
1434
|
|
|
1441
|
-
_defineProperty__default['default'](this, "wsEventQueue", void 0);
|
|
1442
|
-
|
|
1443
1435
|
_defineProperty__default['default'](this, "create", /*#__PURE__*/function () {
|
|
1444
1436
|
var _ref = _asyncToGenerator__default['default']( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(options) {
|
|
1445
1437
|
var defaultOptions;
|
|
@@ -1529,7 +1521,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
1529
1521
|
this.lastTypingEvent = null;
|
|
1530
1522
|
this.isTyping = false;
|
|
1531
1523
|
this.disconnected = false;
|
|
1532
|
-
this.wsEventQueue = [];
|
|
1533
1524
|
}
|
|
1534
1525
|
/**
|
|
1535
1526
|
* getClient - Get the chat client for this channel. If client.disconnect() was called, this function will error
|
|
@@ -2933,9 +2924,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2933
2924
|
case 7:
|
|
2934
2925
|
state = _context28.sent;
|
|
2935
2926
|
this.initialized = true;
|
|
2936
|
-
|
|
2937
|
-
this._flushWsEventQueue();
|
|
2938
|
-
|
|
2939
2927
|
this.data = state.channel;
|
|
2940
2928
|
|
|
2941
2929
|
this._client.logger('info', "channel:watch() - started watching channel ".concat(this.cid), {
|
|
@@ -2945,7 +2933,7 @@ var Channel = /*#__PURE__*/function () {
|
|
|
2945
2933
|
|
|
2946
2934
|
return _context28.abrupt("return", state);
|
|
2947
2935
|
|
|
2948
|
-
case
|
|
2936
|
+
case 12:
|
|
2949
2937
|
case "end":
|
|
2950
2938
|
return _context28.stop();
|
|
2951
2939
|
}
|
|
@@ -3668,11 +3656,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3668
3656
|
|
|
3669
3657
|
var channel = this;
|
|
3670
3658
|
|
|
3671
|
-
if (!this._isInitialized()) {
|
|
3672
|
-
this.wsEventQueue.push(event);
|
|
3673
|
-
return;
|
|
3674
|
-
}
|
|
3675
|
-
|
|
3676
3659
|
this._client.logger('info', "channel:_handleChannelEvent - Received event of type { ".concat(event.type, " } on ").concat(this.cid), {
|
|
3677
3660
|
tags: ['event', 'channel'],
|
|
3678
3661
|
channel: this
|
|
@@ -3923,11 +3906,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
3923
3906
|
channel.state.watcher_count = event.watcher_count;
|
|
3924
3907
|
}
|
|
3925
3908
|
}
|
|
3926
|
-
}, {
|
|
3927
|
-
key: "_isInitialized",
|
|
3928
|
-
value: function _isInitialized() {
|
|
3929
|
-
return this.initialized || this.offlineMode || this.getClient()._isUsingServerAuth();
|
|
3930
|
-
}
|
|
3931
3909
|
}, {
|
|
3932
3910
|
key: "_checkInitialized",
|
|
3933
3911
|
value: function _checkInitialized() {
|
|
@@ -4089,14 +4067,6 @@ var Channel = /*#__PURE__*/function () {
|
|
|
4089
4067
|
this.disconnected = true;
|
|
4090
4068
|
this.state.setIsUpToDate(false);
|
|
4091
4069
|
}
|
|
4092
|
-
}, {
|
|
4093
|
-
key: "_flushWsEventQueue",
|
|
4094
|
-
value: function _flushWsEventQueue() {
|
|
4095
|
-
while (this.wsEventQueue.length) {
|
|
4096
|
-
var event = this.wsEventQueue.shift();
|
|
4097
|
-
if (event) this.getClient().dispatchEvent(event);
|
|
4098
|
-
}
|
|
4099
|
-
}
|
|
4100
4070
|
}]);
|
|
4101
4071
|
|
|
4102
4072
|
return Channel;
|
|
@@ -10192,7 +10162,7 @@ var StreamChat = /*#__PURE__*/function () {
|
|
|
10192
10162
|
}, {
|
|
10193
10163
|
key: "getUserAgent",
|
|
10194
10164
|
value: function getUserAgent() {
|
|
10195
|
-
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.
|
|
10165
|
+
return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.14.0");
|
|
10196
10166
|
}
|
|
10197
10167
|
}, {
|
|
10198
10168
|
key: "setUserAgent",
|
|
@@ -11586,30 +11556,6 @@ var EVENT_MAP = {
|
|
|
11586
11556
|
'connection.changed': true,
|
|
11587
11557
|
'connection.recovered': true,
|
|
11588
11558
|
'transport.changed': true
|
|
11589
|
-
}; // events handled by channel._handleChannelEvent
|
|
11590
|
-
|
|
11591
|
-
var CHANNEL_HANDLED_EVENTS = {
|
|
11592
|
-
'typing.start': true,
|
|
11593
|
-
'typing.stop': true,
|
|
11594
|
-
'message.read': true,
|
|
11595
|
-
'user.watching.start': true,
|
|
11596
|
-
'user.updated': true,
|
|
11597
|
-
'user.watching.stop': true,
|
|
11598
|
-
'message.deleted': true,
|
|
11599
|
-
'message.new': true,
|
|
11600
|
-
'message.updated': true,
|
|
11601
|
-
'channel.truncated': true,
|
|
11602
|
-
'member.added': true,
|
|
11603
|
-
'member.updated': true,
|
|
11604
|
-
'member.removed': true,
|
|
11605
|
-
'channel.updated': true,
|
|
11606
|
-
'reaction.new': true,
|
|
11607
|
-
'reaction.deleted': true,
|
|
11608
|
-
'reaction.updated': true,
|
|
11609
|
-
'channel.hidden': true,
|
|
11610
|
-
'channel.visible': true,
|
|
11611
|
-
'user.banned': true,
|
|
11612
|
-
'user.unbanned': true
|
|
11613
11559
|
};
|
|
11614
11560
|
|
|
11615
11561
|
var Allow = 'Allow';
|
|
@@ -11692,7 +11638,6 @@ exports.AnyResource = AnyResource;
|
|
|
11692
11638
|
exports.AnyRole = AnyRole;
|
|
11693
11639
|
exports.BuiltinPermissions = BuiltinPermissions;
|
|
11694
11640
|
exports.BuiltinRoles = BuiltinRoles;
|
|
11695
|
-
exports.CHANNEL_HANDLED_EVENTS = CHANNEL_HANDLED_EVENTS;
|
|
11696
11641
|
exports.Channel = Channel;
|
|
11697
11642
|
exports.ChannelState = ChannelState;
|
|
11698
11643
|
exports.CheckSignature = CheckSignature;
|