stream-chat 8.25.0 → 8.25.1

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.es.js CHANGED
@@ -3146,7 +3146,8 @@ var Channel = /*#__PURE__*/function () {
3146
3146
  if ((_message$user2 = message.user) !== null && _message$user2 !== void 0 && _message$user2.id && this.getClient().userMuteStatus(message.user.id)) return false;
3147
3147
  if (message.type === 'system') return false; // Return false if channel doesn't allow read events.
3148
3148
 
3149
- if (Array.isArray((_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.own_capabilities) && !((_this$data5 = this.data) !== null && _this$data5 !== void 0 && _this$data5.own_capabilities.includes('read-events'))) return false;
3149
+ if (Array.isArray((_this$data4 = this.data) === null || _this$data4 === void 0 ? void 0 : _this$data4.own_capabilities) && !((_this$data5 = this.data) !== null && _this$data5 !== void 0 && _this$data5.own_capabilities.includes('read-events'))) return false; // FIXME: see #1265, adjust and count new messages even when the channel is muted
3150
+
3150
3151
  if (this.muteStatus().muted) return false;
3151
3152
  return true;
3152
3153
  }
@@ -8390,8 +8391,8 @@ var StreamChat = /*#__PURE__*/function () {
8390
8391
  key: "_handleClientEvent",
8391
8392
  value: function _handleClientEvent(event) {
8392
8393
  var _event$me,
8393
- _this3 = this,
8394
- _event$me2;
8394
+ _event$me2,
8395
+ _this3 = this;
8395
8396
 
8396
8397
  var client = this;
8397
8398
  var postListenerCallbacks = [];
@@ -8416,21 +8417,6 @@ var StreamChat = /*#__PURE__*/function () {
8416
8417
  }
8417
8418
 
8418
8419
  if (event.type === 'notification.channel_mutes_updated' && (_event$me = event.me) !== null && _event$me !== void 0 && _event$me.channel_mutes) {
8419
- var currentMutedChannelIds = [];
8420
- var nextMutedChannelIds = [];
8421
- this.mutedChannels.forEach(function (mute) {
8422
- return mute.channel && currentMutedChannelIds.push(mute.channel.cid);
8423
- });
8424
- event.me.channel_mutes.forEach(function (mute) {
8425
- return mute.channel && nextMutedChannelIds.push(mute.channel.cid);
8426
- });
8427
- /** Set the unread count of un-muted channels to 0, which is the behaviour of backend */
8428
-
8429
- currentMutedChannelIds.forEach(function (cid) {
8430
- if (!nextMutedChannelIds.includes(cid) && _this3.activeChannels[cid]) {
8431
- _this3.activeChannels[cid].state.unreadCount = 0;
8432
- }
8433
- });
8434
8420
  this.mutedChannels = event.me.channel_mutes;
8435
8421
  }
8436
8422
 
@@ -11117,7 +11103,7 @@ var StreamChat = /*#__PURE__*/function () {
11117
11103
  }, {
11118
11104
  key: "getUserAgent",
11119
11105
  value: function getUserAgent() {
11120
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.0");
11106
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.1");
11121
11107
  }
11122
11108
  }, {
11123
11109
  key: "setUserAgent",