stream-chat 9.25.0 → 9.26.0

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.
@@ -1362,10 +1362,8 @@ var ChannelState = class {
1362
1362
  if (initializing && message.id && this.threads[message.id]) {
1363
1363
  delete this.threads[message.id];
1364
1364
  }
1365
- if (!this.last_message_at) {
1366
- this.last_message_at = new Date(message.created_at.getTime());
1367
- }
1368
- if (message.created_at.getTime() > this.last_message_at.getTime()) {
1365
+ const shouldSkipLastMessageAtUpdate = this._channel.getConfig()?.skip_last_msg_update_for_system_msgs && message.type === "system";
1366
+ if (!shouldSkipLastMessageAtUpdate && (!this.last_message_at || message.created_at.getTime() > this.last_message_at.getTime())) {
1369
1367
  this.last_message_at = new Date(message.created_at.getTime());
1370
1368
  }
1371
1369
  }
@@ -8259,6 +8257,28 @@ var Channel = class {
8259
8257
  async addMembers(members, message, options = {}) {
8260
8258
  return await this._update({ add_members: members, message, ...options });
8261
8259
  }
8260
+ /**
8261
+ * addFilterTags - add filter tags to the channel
8262
+ *
8263
+ * @param {string[]} tags An array of tags to add to the channel
8264
+ * @param {Message} [message] Optional message object for channel members notification
8265
+ * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
8266
+ * @return {Promise<UpdateChannelAPIResponse>} The server response
8267
+ */
8268
+ async addFilterTags(tags, message, options = {}) {
8269
+ return await this._update({ add_filter_tags: tags, message, ...options });
8270
+ }
8271
+ /**
8272
+ * removeFilterTags - remove filter tags from the channel
8273
+ *
8274
+ * @param {string[]} tags An array of tags to remove from the channel
8275
+ * @param {Message} [message] Optional message object for channel members notification
8276
+ * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
8277
+ * @return {Promise<UpdateChannelAPIResponse>} The server response
8278
+ */
8279
+ async removeFilterTags(tags, message, options = {}) {
8280
+ return await this._update({ remove_filter_tags: tags, message, ...options });
8281
+ }
8262
8282
  /**
8263
8283
  * addModerators - add moderators to the channel
8264
8284
  *
@@ -9202,6 +9222,11 @@ var Channel = class {
9202
9222
  deliveredAt: event.created_at,
9203
9223
  lastDeliveredMessageId: event.last_delivered_message_id
9204
9224
  });
9225
+ const client = this.getClient();
9226
+ const isOwnEvent = event.user?.id === client.user?.id;
9227
+ if (isOwnEvent) {
9228
+ client.syncDeliveredCandidates([this]);
9229
+ }
9205
9230
  }
9206
9231
  break;
9207
9232
  case "user.watching.start":
@@ -14646,7 +14671,7 @@ var StreamChat = class _StreamChat {
14646
14671
  if (this.userAgent) {
14647
14672
  return this.userAgent;
14648
14673
  }
14649
- const version = "9.25.0";
14674
+ const version = "9.26.0";
14650
14675
  const clientBundle = "browser-cjs";
14651
14676
  let userAgentString = "";
14652
14677
  if (this.sdkIdentifier) {