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.
- package/dist/cjs/index.browser.js +30 -5
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +30 -5
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +30 -5
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/channel.d.ts +18 -0
- package/dist/types/types.d.ts +13 -0
- package/package.json +1 -1
- package/src/channel.ts +41 -0
- package/src/channel_state.ts +9 -5
- package/src/types.ts +13 -0
package/dist/cjs/index.node.js
CHANGED
|
@@ -1341,10 +1341,8 @@ var ChannelState = class {
|
|
|
1341
1341
|
if (initializing && message.id && this.threads[message.id]) {
|
|
1342
1342
|
delete this.threads[message.id];
|
|
1343
1343
|
}
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
}
|
|
1347
|
-
if (message.created_at.getTime() > this.last_message_at.getTime()) {
|
|
1344
|
+
const shouldSkipLastMessageAtUpdate = this._channel.getConfig()?.skip_last_msg_update_for_system_msgs && message.type === "system";
|
|
1345
|
+
if (!shouldSkipLastMessageAtUpdate && (!this.last_message_at || message.created_at.getTime() > this.last_message_at.getTime())) {
|
|
1348
1346
|
this.last_message_at = new Date(message.created_at.getTime());
|
|
1349
1347
|
}
|
|
1350
1348
|
}
|
|
@@ -8238,6 +8236,28 @@ var Channel = class {
|
|
|
8238
8236
|
async addMembers(members, message, options = {}) {
|
|
8239
8237
|
return await this._update({ add_members: members, message, ...options });
|
|
8240
8238
|
}
|
|
8239
|
+
/**
|
|
8240
|
+
* addFilterTags - add filter tags to the channel
|
|
8241
|
+
*
|
|
8242
|
+
* @param {string[]} tags An array of tags to add to the channel
|
|
8243
|
+
* @param {Message} [message] Optional message object for channel members notification
|
|
8244
|
+
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
8245
|
+
* @return {Promise<UpdateChannelAPIResponse>} The server response
|
|
8246
|
+
*/
|
|
8247
|
+
async addFilterTags(tags, message, options = {}) {
|
|
8248
|
+
return await this._update({ add_filter_tags: tags, message, ...options });
|
|
8249
|
+
}
|
|
8250
|
+
/**
|
|
8251
|
+
* removeFilterTags - remove filter tags from the channel
|
|
8252
|
+
*
|
|
8253
|
+
* @param {string[]} tags An array of tags to remove from the channel
|
|
8254
|
+
* @param {Message} [message] Optional message object for channel members notification
|
|
8255
|
+
* @param {ChannelUpdateOptions} [options] Option object, configuration to control the behavior while updating
|
|
8256
|
+
* @return {Promise<UpdateChannelAPIResponse>} The server response
|
|
8257
|
+
*/
|
|
8258
|
+
async removeFilterTags(tags, message, options = {}) {
|
|
8259
|
+
return await this._update({ remove_filter_tags: tags, message, ...options });
|
|
8260
|
+
}
|
|
8241
8261
|
/**
|
|
8242
8262
|
* addModerators - add moderators to the channel
|
|
8243
8263
|
*
|
|
@@ -9181,6 +9201,11 @@ var Channel = class {
|
|
|
9181
9201
|
deliveredAt: event.created_at,
|
|
9182
9202
|
lastDeliveredMessageId: event.last_delivered_message_id
|
|
9183
9203
|
});
|
|
9204
|
+
const client = this.getClient();
|
|
9205
|
+
const isOwnEvent = event.user?.id === client.user?.id;
|
|
9206
|
+
if (isOwnEvent) {
|
|
9207
|
+
client.syncDeliveredCandidates([this]);
|
|
9208
|
+
}
|
|
9184
9209
|
}
|
|
9185
9210
|
break;
|
|
9186
9211
|
case "user.watching.start":
|
|
@@ -14625,7 +14650,7 @@ var StreamChat = class _StreamChat {
|
|
|
14625
14650
|
if (this.userAgent) {
|
|
14626
14651
|
return this.userAgent;
|
|
14627
14652
|
}
|
|
14628
|
-
const version = "9.
|
|
14653
|
+
const version = "9.26.0";
|
|
14629
14654
|
const clientBundle = "node-cjs";
|
|
14630
14655
|
let userAgentString = "";
|
|
14631
14656
|
if (this.sdkIdentifier) {
|