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/browser.js CHANGED
@@ -734,6 +734,7 @@ var EVENT_MAP = {
734
734
  'channel.created': true,
735
735
  'channel.deleted': true,
736
736
  'channel.hidden': true,
737
+ 'channel.kicked': true,
737
738
  'channel.muted': true,
738
739
  'channel.truncated': true,
739
740
  'channel.unmuted': true,
@@ -3293,7 +3294,16 @@ var Channel = /*#__PURE__*/function () {
3293
3294
 
3294
3295
  case 'channel.truncated':
3295
3296
  channelState.clearMessages();
3296
- channelState.unreadCount = 0;
3297
+ channelState.unreadCount = 0; // system messages don't increment unread counts
3298
+
3299
+ if (event.message) {
3300
+ channelState.addMessageSorted(event.message);
3301
+
3302
+ if (event.message.pinned) {
3303
+ channelState.addPinnedMessage(event.message);
3304
+ }
3305
+ }
3306
+
3297
3307
  break;
3298
3308
 
3299
3309
  case 'member.added':
@@ -9067,7 +9077,7 @@ var StreamChat = /*#__PURE__*/function () {
9067
9077
  }, {
9068
9078
  key: "getUserAgent",
9069
9079
  value: function getUserAgent() {
9070
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.2");
9080
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.2.0");
9071
9081
  }
9072
9082
  }, {
9073
9083
  key: "setUserAgent",
@@ -9325,6 +9335,11 @@ var StreamChat = /*#__PURE__*/function () {
9325
9335
 
9326
9336
  return this.post("".concat(this.baseURL, "/export_channels"), payload);
9327
9337
  }
9338
+ }, {
9339
+ key: "exportUsers",
9340
+ value: function exportUsers(request) {
9341
+ return this.post("".concat(this.baseURL, "/export/users"), request);
9342
+ }
9328
9343
  }, {
9329
9344
  key: "exportChannel",
9330
9345
  value: function exportChannel(request, options) {