stream-chat 8.40.0 → 8.40.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.
@@ -3589,8 +3589,7 @@ var Channel = /*#__PURE__*/function () {
3589
3589
  if (message.silent) return false;
3590
3590
  if (message.parent_id && !message.show_in_channel) return false;
3591
3591
  if (((_message$user = message.user) === null || _message$user === void 0 ? void 0 : _message$user.id) === this.getClient().userID) return false;
3592
- if ((_message$user2 = message.user) !== null && _message$user2 !== void 0 && _message$user2.id && this.getClient().userMuteStatus(message.user.id)) return false;
3593
- if (message.type === 'system') return false; // Return false if channel doesn't allow read events.
3592
+ if ((_message$user2 = message.user) !== null && _message$user2 !== void 0 && _message$user2.id && this.getClient().userMuteStatus(message.user.id)) return false; // Return false if channel doesn't allow read events.
3594
3593
 
3595
3594
  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
3596
3595
 
@@ -7549,8 +7548,15 @@ var Thread = /*#__PURE__*/function () {
7549
7548
  return _this.client.on('message.deleted', function (event) {
7550
7549
  var _event$message2;
7551
7550
 
7552
- if (((_event$message2 = event.message) === null || _event$message2 === void 0 ? void 0 : _event$message2.parent_id) === _this.id && event.hard_delete) {
7553
- return _this.deleteReplyLocally({
7551
+ if (((_event$message2 = event.message) === null || _event$message2 === void 0 ? void 0 : _event$message2.parent_id) !== _this.id) return;
7552
+
7553
+ if (event.hard_delete) {
7554
+ _this.deleteReplyLocally({
7555
+ message: event.message
7556
+ });
7557
+ } else {
7558
+ // Handle soft delete (updates deleted_at timestamp)
7559
+ _this.upsertReplyLocally({
7554
7560
  message: event.message
7555
7561
  });
7556
7562
  }
@@ -13263,7 +13269,7 @@ var StreamChat = /*#__PURE__*/function () {
13263
13269
  }, {
13264
13270
  key: "getUserAgent",
13265
13271
  value: function getUserAgent() {
13266
- return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.40.0");
13272
+ return this.userAgent || "stream-chat-javascript-client-".concat(this.node ? 'node' : 'browser', "-", "8.40.2");
13267
13273
  }
13268
13274
  }, {
13269
13275
  key: "setUserAgent",