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.
@@ -3145,7 +3145,8 @@ var Channel = /*#__PURE__*/function () {
3145
3145
  if ((_message$user2 = message.user) !== null && _message$user2 !== void 0 && _message$user2.id && this.getClient().userMuteStatus(message.user.id)) return false;
3146
3146
  if (message.type === 'system') return false; // Return false if channel doesn't allow read events.
3147
3147
 
3148
- 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;
3148
+ 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
3149
+
3149
3150
  if (this.muteStatus().muted) return false;
3150
3151
  return true;
3151
3152
  }
@@ -8387,8 +8388,8 @@ var StreamChat = /*#__PURE__*/function () {
8387
8388
  key: "_handleClientEvent",
8388
8389
  value: function _handleClientEvent(event) {
8389
8390
  var _event$me,
8390
- _this3 = this,
8391
- _event$me2;
8391
+ _event$me2,
8392
+ _this3 = this;
8392
8393
 
8393
8394
  var client = this;
8394
8395
  var postListenerCallbacks = [];
@@ -8413,21 +8414,6 @@ var StreamChat = /*#__PURE__*/function () {
8413
8414
  }
8414
8415
 
8415
8416
  if (event.type === 'notification.channel_mutes_updated' && (_event$me = event.me) !== null && _event$me !== void 0 && _event$me.channel_mutes) {
8416
- var currentMutedChannelIds = [];
8417
- var nextMutedChannelIds = [];
8418
- this.mutedChannels.forEach(function (mute) {
8419
- return mute.channel && currentMutedChannelIds.push(mute.channel.cid);
8420
- });
8421
- event.me.channel_mutes.forEach(function (mute) {
8422
- return mute.channel && nextMutedChannelIds.push(mute.channel.cid);
8423
- });
8424
- /** Set the unread count of un-muted channels to 0, which is the behaviour of backend */
8425
-
8426
- currentMutedChannelIds.forEach(function (cid) {
8427
- if (!nextMutedChannelIds.includes(cid) && _this3.activeChannels[cid]) {
8428
- _this3.activeChannels[cid].state.unreadCount = 0;
8429
- }
8430
- });
8431
8417
  this.mutedChannels = event.me.channel_mutes;
8432
8418
  }
8433
8419
 
@@ -11114,7 +11100,7 @@ var StreamChat = /*#__PURE__*/function () {
11114
11100
  }, {
11115
11101
  key: "getUserAgent",
11116
11102
  value: function getUserAgent() {
11117
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.0");
11103
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.1");
11118
11104
  }
11119
11105
  }, {
11120
11106
  key: "setUserAgent",