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/browser.js CHANGED
@@ -331,6 +331,12 @@ var ChannelState = /*#__PURE__*/function () {
331
331
  for (var i = 0; i < newMessages.length; i += 1) {
332
332
  var _this$_channel;
333
333
 
334
+ var isFromShadowBannedUser = newMessages[i].shadowed;
335
+
336
+ if (isFromShadowBannedUser) {
337
+ continue;
338
+ }
339
+
334
340
  var message = this.formatMessage(newMessages[i]);
335
341
 
336
342
  if (message.user && (_this$_channel = this._channel) !== null && _this$_channel !== void 0 && _this$_channel.cid) {
@@ -823,6 +829,10 @@ function isFileWebAPI(uri) {
823
829
  return typeof window !== 'undefined' && 'File' in window && uri instanceof File;
824
830
  }
825
831
 
832
+ function isBlobWebAPI(uri) {
833
+ return typeof window !== 'undefined' && 'Blob' in window && uri instanceof Blob;
834
+ }
835
+
826
836
  function isOwnUser(user) {
827
837
  return (user === null || user === void 0 ? void 0 : user.total_unread_count) !== undefined;
828
838
  }
@@ -842,7 +852,7 @@ function isOwnUserBaseProperty(property) {
842
852
  function addFileToFormData(uri, name, contentType) {
843
853
  var data = new FormData__default['default']();
844
854
 
845
- if (isReadableStream(uri) || isBuffer(uri) || isFileWebAPI(uri)) {
855
+ if (isReadableStream(uri) || isBuffer(uri) || isFileWebAPI(uri) || isBlobWebAPI(uri)) {
846
856
  if (name) data.append('file', uri, name);else data.append('file', uri);
847
857
  } else {
848
858
  data.append('file', {
@@ -9057,7 +9067,7 @@ var StreamChat = /*#__PURE__*/function () {
9057
9067
  }, {
9058
9068
  key: "getUserAgent",
9059
9069
  value: function getUserAgent() {
9060
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.1");
9070
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "5.1.2");
9061
9071
  }
9062
9072
  }, {
9063
9073
  key: "setUserAgent",