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.
@@ -1181,10 +1181,8 @@ var ChannelState = class {
1181
1181
  if (initializing && message.id && this.threads[message.id]) {
1182
1182
  delete this.threads[message.id];
1183
1183
  }
1184
- if (!this.last_message_at) {
1185
- this.last_message_at = new Date(message.created_at.getTime());
1186
- }
1187
- if (message.created_at.getTime() > this.last_message_at.getTime()) {
1184
+ const shouldSkipLastMessageAtUpdate = this._channel.getConfig()?.skip_last_msg_update_for_system_msgs && message.type === "system";
1185
+ if (!shouldSkipLastMessageAtUpdate && (!this.last_message_at || message.created_at.getTime() > this.last_message_at.getTime())) {
1188
1186
  this.last_message_at = new Date(message.created_at.getTime());
1189
1187
  }
1190
1188
  }
@@ -8078,6 +8076,28 @@ var Channel = class {
8078
8076
  async addMembers(members, message, options = {}) {
8079
8077
  return await this._update({ add_members: members, message, ...options });
8080
8078
  }
8079
+ /**
8080
+ * addFilterTags - add filter tags to the channel
8081
+ *
8082
+ * @param {string[]} tags An array of tags to add to the channel
8083
+ * @param {Message} [message] Optional message object for channel members notification
8084
+ * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
8085
+ * @return {Promise<UpdateChannelAPIResponse>} The server response
8086
+ */
8087
+ async addFilterTags(tags, message, options = {}) {
8088
+ return await this._update({ add_filter_tags: tags, message, ...options });
8089
+ }
8090
+ /**
8091
+ * removeFilterTags - remove filter tags from the channel
8092
+ *
8093
+ * @param {string[]} tags An array of tags to remove from the channel
8094
+ * @param {Message} [message] Optional message object for channel members notification
8095
+ * @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
8096
+ * @return {Promise<UpdateChannelAPIResponse>} The server response
8097
+ */
8098
+ async removeFilterTags(tags, message, options = {}) {
8099
+ return await this._update({ remove_filter_tags: tags, message, ...options });
8100
+ }
8081
8101
  /**
8082
8102
  * addModerators - add moderators to the channel
8083
8103
  *
@@ -9021,6 +9041,11 @@ var Channel = class {
9021
9041
  deliveredAt: event.created_at,
9022
9042
  lastDeliveredMessageId: event.last_delivered_message_id
9023
9043
  });
9044
+ const client = this.getClient();
9045
+ const isOwnEvent = event.user?.id === client.user?.id;
9046
+ if (isOwnEvent) {
9047
+ client.syncDeliveredCandidates([this]);
9048
+ }
9024
9049
  }
9025
9050
  break;
9026
9051
  case "user.watching.start":
@@ -14465,7 +14490,7 @@ var StreamChat = class _StreamChat {
14465
14490
  if (this.userAgent) {
14466
14491
  return this.userAgent;
14467
14492
  }
14468
- const version = "9.25.0";
14493
+ const version = "9.26.0";
14469
14494
  const clientBundle = "browser-esm";
14470
14495
  let userAgentString = "";
14471
14496
  if (this.sdkIdentifier) {