stream-chat 5.1.2 → 5.2.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/index.es.js CHANGED
@@ -715,6 +715,7 @@ var EVENT_MAP = {
715
715
  'channel.created': true,
716
716
  'channel.deleted': true,
717
717
  'channel.hidden': true,
718
+ 'channel.kicked': true,
718
719
  'channel.muted': true,
719
720
  'channel.truncated': true,
720
721
  'channel.unmuted': true,
@@ -3274,7 +3275,16 @@ var Channel = /*#__PURE__*/function () {
3274
3275
 
3275
3276
  case 'channel.truncated':
3276
3277
  channelState.clearMessages();
3277
- channelState.unreadCount = 0;
3278
+ channelState.unreadCount = 0; // system messages don't increment unread counts
3279
+
3280
+ if (event.message) {
3281
+ channelState.addMessageSorted(event.message);
3282
+
3283
+ if (event.message.pinned) {
3284
+ channelState.addPinnedMessage(event.message);
3285
+ }
3286
+ }
3287
+
3278
3288
  break;
3279
3289
 
3280
3290
  case 'member.added':
@@ -9050,7 +9060,7 @@ var StreamChat = /*#__PURE__*/function () {
9050
9060
  }, {
9051
9061
  key: "getUserAgent",
9052
9062
  value: function getUserAgent() {
9053
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.2");
9063
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.2.0");
9054
9064
  }
9055
9065
  }, {
9056
9066
  key: "setUserAgent",
@@ -9308,6 +9318,11 @@ var StreamChat = /*#__PURE__*/function () {
9308
9318
 
9309
9319
  return this.post("".concat(this.baseURL, "/export_channels"), payload);
9310
9320
  }
9321
+ }, {
9322
+ key: "exportUsers",
9323
+ value: function exportUsers(request) {
9324
+ return this.post("".concat(this.baseURL, "/export/users"), request);
9325
+ }
9311
9326
  }, {
9312
9327
  key: "exportChannel",
9313
9328
  value: function exportChannel(request, options) {