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.js CHANGED
@@ -3174,7 +3174,8 @@ var Channel = /*#__PURE__*/function () {
3174
3174
  if ((_message$user2 = message.user) !== null && _message$user2 !== void 0 && _message$user2.id && this.getClient().userMuteStatus(message.user.id)) return false;
3175
3175
  if (message.type === 'system') return false; // Return false if channel doesn't allow read events.
3176
3176
 
3177
- 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;
3177
+ 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
3178
+
3178
3179
  if (this.muteStatus().muted) return false;
3179
3180
  return true;
3180
3181
  }
@@ -8418,8 +8419,8 @@ var StreamChat = /*#__PURE__*/function () {
8418
8419
  key: "_handleClientEvent",
8419
8420
  value: function _handleClientEvent(event) {
8420
8421
  var _event$me,
8421
- _this3 = this,
8422
- _event$me2;
8422
+ _event$me2,
8423
+ _this3 = this;
8423
8424
 
8424
8425
  var client = this;
8425
8426
  var postListenerCallbacks = [];
@@ -8444,21 +8445,6 @@ var StreamChat = /*#__PURE__*/function () {
8444
8445
  }
8445
8446
 
8446
8447
  if (event.type === 'notification.channel_mutes_updated' && (_event$me = event.me) !== null && _event$me !== void 0 && _event$me.channel_mutes) {
8447
- var currentMutedChannelIds = [];
8448
- var nextMutedChannelIds = [];
8449
- this.mutedChannels.forEach(function (mute) {
8450
- return mute.channel && currentMutedChannelIds.push(mute.channel.cid);
8451
- });
8452
- event.me.channel_mutes.forEach(function (mute) {
8453
- return mute.channel && nextMutedChannelIds.push(mute.channel.cid);
8454
- });
8455
- /** Set the unread count of un-muted channels to 0, which is the behaviour of backend */
8456
-
8457
- currentMutedChannelIds.forEach(function (cid) {
8458
- if (!nextMutedChannelIds.includes(cid) && _this3.activeChannels[cid]) {
8459
- _this3.activeChannels[cid].state.unreadCount = 0;
8460
- }
8461
- });
8462
8448
  this.mutedChannels = event.me.channel_mutes;
8463
8449
  }
8464
8450
 
@@ -11145,7 +11131,7 @@ var StreamChat = /*#__PURE__*/function () {
11145
11131
  }, {
11146
11132
  key: "getUserAgent",
11147
11133
  value: function getUserAgent() {
11148
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.0");
11134
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.25.1");
11149
11135
  }
11150
11136
  }, {
11151
11137
  key: "setUserAgent",