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/dist/index.js CHANGED
@@ -335,6 +335,12 @@ var ChannelState = /*#__PURE__*/function () {
335
335
  for (var i = 0; i < newMessages.length; i += 1) {
336
336
  var _this$_channel;
337
337
 
338
+ var isFromShadowBannedUser = newMessages[i].shadowed;
339
+
340
+ if (isFromShadowBannedUser) {
341
+ continue;
342
+ }
343
+
338
344
  var message = this.formatMessage(newMessages[i]);
339
345
 
340
346
  if (message.user && (_this$_channel = this._channel) !== null && _this$_channel !== void 0 && _this$_channel.cid) {
@@ -827,6 +833,10 @@ function isFileWebAPI(uri) {
827
833
  return typeof window !== 'undefined' && 'File' in window && uri instanceof File;
828
834
  }
829
835
 
836
+ function isBlobWebAPI(uri) {
837
+ return typeof window !== 'undefined' && 'Blob' in window && uri instanceof Blob;
838
+ }
839
+
830
840
  function isOwnUser(user) {
831
841
  return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
832
842
  }
@@ -846,7 +856,7 @@ function isOwnUserBaseProperty(property) {
846
856
  function addFileToFormData(uri, name, contentType) {
847
857
  var data = new FormData__default['default']();
848
858
 
849
- if (isReadableStream(uri) || isBuffer(uri) || isFileWebAPI(uri)) {
859
+ if (isReadableStream(uri) || isBuffer(uri) || isFileWebAPI(uri) || isBlobWebAPI(uri)) {
850
860
  if (name) data.append('file', uri, name);else data.append('file', uri);
851
861
  } else {
852
862
  data.append('file', {
@@ -9063,7 +9073,7 @@ var StreamChat = /*#__PURE__*/function () {
9063
9073
  }, {
9064
9074
  key: "getUserAgent",
9065
9075
  value: function getUserAgent() {
9066
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.1");
9076
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.2");
9067
9077
  }
9068
9078
  }, {
9069
9079
  key: "setUserAgent",