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.js CHANGED
@@ -738,6 +738,7 @@ var EVENT_MAP = {
738
738
  'channel.created': true,
739
739
  'channel.deleted': true,
740
740
  'channel.hidden': true,
741
+ 'channel.kicked': true,
741
742
  'channel.muted': true,
742
743
  'channel.truncated': true,
743
744
  'channel.unmuted': true,
@@ -3297,7 +3298,16 @@ var Channel = /*#__PURE__*/function () {
3297
3298
 
3298
3299
  case 'channel.truncated':
3299
3300
  channelState.clearMessages();
3300
- channelState.unreadCount = 0;
3301
+ channelState.unreadCount = 0; // system messages don't increment unread counts
3302
+
3303
+ if (event.message) {
3304
+ channelState.addMessageSorted(event.message);
3305
+
3306
+ if (event.message.pinned) {
3307
+ channelState.addPinnedMessage(event.message);
3308
+ }
3309
+ }
3310
+
3301
3311
  break;
3302
3312
 
3303
3313
  case 'member.added':
@@ -9073,7 +9083,7 @@ var StreamChat = /*#__PURE__*/function () {
9073
9083
  }, {
9074
9084
  key: "getUserAgent",
9075
9085
  value: function getUserAgent() {
9076
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.2");
9086
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.2.0");
9077
9087
  }
9078
9088
  }, {
9079
9089
  key: "setUserAgent",
@@ -9331,6 +9341,11 @@ var StreamChat = /*#__PURE__*/function () {
9331
9341
 
9332
9342
  return this.post("".concat(this.baseURL, "/export_channels"), payload);
9333
9343
  }
9344
+ }, {
9345
+ key: "exportUsers",
9346
+ value: function exportUsers(request) {
9347
+ return this.post("".concat(this.baseURL, "/export/users"), request);
9348
+ }
9334
9349
  }, {
9335
9350
  key: "exportChannel",
9336
9351
  value: function exportChannel(request, options) {