stream-chat 5.1.1 → 5.1.2

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/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Stream Chat JS
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/stream-chat.svg)](https://www.npmjs.com/package/stream-chat)
4
- [![Actions Status](https://github.com/GetStream/stream-chat-js/workflows/build/badge.svg)](https://github.com/GetStream/stream-chat-js/actions)
5
4
 
6
5
  stream-chat-js is the official JavaScript client for Stream Chat, a service for building chat applications.
7
6
 
@@ -311,6 +311,12 @@ var ChannelState = /*#__PURE__*/function () {
311
311
  for (var i = 0; i < newMessages.length; i += 1) {
312
312
  var _this$_channel;
313
313
 
314
+ var isFromShadowBannedUser = newMessages[i].shadowed;
315
+
316
+ if (isFromShadowBannedUser) {
317
+ continue;
318
+ }
319
+
314
320
  var message = this.formatMessage(newMessages[i]);
315
321
 
316
322
  if (message.user && (_this$_channel = this._channel) !== null && _this$_channel !== void 0 && _this$_channel.cid) {
@@ -803,6 +809,10 @@ function isFileWebAPI(uri) {
803
809
  return typeof window !== 'undefined' && 'File' in window && uri instanceof File;
804
810
  }
805
811
 
812
+ function isBlobWebAPI(uri) {
813
+ return typeof window !== 'undefined' && 'Blob' in window && uri instanceof Blob;
814
+ }
815
+
806
816
  function isOwnUser(user) {
807
817
  return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
808
818
  }
@@ -822,7 +832,7 @@ function isOwnUserBaseProperty(property) {
822
832
  function addFileToFormData(uri, name, contentType) {
823
833
  var data = new FormData();
824
834
 
825
- if (isReadableStream(uri) || isBuffer(uri) || isFileWebAPI(uri)) {
835
+ if (isReadableStream(uri) || isBuffer(uri) || isFileWebAPI(uri) || isBlobWebAPI(uri)) {
826
836
  if (name) data.append('file', uri, name);else data.append('file', uri);
827
837
  } else {
828
838
  data.append('file', {
@@ -9037,7 +9047,7 @@ var StreamChat = /*#__PURE__*/function () {
9037
9047
  }, {
9038
9048
  key: "getUserAgent",
9039
9049
  value: function getUserAgent() {
9040
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.1");
9050
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.2");
9041
9051
  }
9042
9052
  }, {
9043
9053
  key: "setUserAgent",