stream-chat 9.45.2 → 9.45.4
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 +14 -13
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +14 -13
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +14 -13
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/moderation.d.ts +1 -2
- package/package.json +1 -1
- package/src/channel.ts +0 -7
- package/src/moderation.ts +3 -2
- package/src/search/UserSearchSource.ts +7 -1
|
@@ -5003,7 +5003,13 @@ var UserSearchSource = class extends BaseSearchSource {
|
|
|
5003
5003
|
baseFilters: this.filters,
|
|
5004
5004
|
context: { searchQuery }
|
|
5005
5005
|
});
|
|
5006
|
-
|
|
5006
|
+
let sort;
|
|
5007
|
+
if (Array.isArray(this.sort)) {
|
|
5008
|
+
const hasIdSort = this.sort.some((entry) => "id" in entry);
|
|
5009
|
+
sort = hasIdSort ? this.sort : [...this.sort, { id: 1 }];
|
|
5010
|
+
} else {
|
|
5011
|
+
sort = { id: 1, ...this.sort };
|
|
5012
|
+
}
|
|
5007
5013
|
const options = { ...this.searchOptions, limit: this.pageSize, offset: this.offset };
|
|
5008
5014
|
const { users } = await this.client.queryUsers(filters, sort, options);
|
|
5009
5015
|
return { items: users };
|
|
@@ -10788,9 +10794,6 @@ var Channel = class {
|
|
|
10788
10794
|
...channelState.members,
|
|
10789
10795
|
[memberCopy.user.id]: memberCopy
|
|
10790
10796
|
};
|
|
10791
|
-
if (channel.data?.member_count && event.type === "member.added") {
|
|
10792
|
-
channel.data.member_count += 1;
|
|
10793
|
-
}
|
|
10794
10797
|
}
|
|
10795
10798
|
const currentUserId = this.getClient().userID;
|
|
10796
10799
|
if (typeof currentUserId === "string" && typeof memberCopy?.user?.id === "string" && memberCopy.user.id === currentUserId) {
|
|
@@ -10805,9 +10808,6 @@ var Channel = class {
|
|
|
10805
10808
|
};
|
|
10806
10809
|
delete newMembers[event.user.id];
|
|
10807
10810
|
channelState.members = newMembers;
|
|
10808
|
-
if (channel.data?.member_count) {
|
|
10809
|
-
channel.data.member_count = Math.max(channel.data.member_count - 1, 0);
|
|
10810
|
-
}
|
|
10811
10811
|
}
|
|
10812
10812
|
break;
|
|
10813
10813
|
case "notification.mark_unread": {
|
|
@@ -12373,7 +12373,7 @@ var Moderation = class {
|
|
|
12373
12373
|
* @param options
|
|
12374
12374
|
* @returns
|
|
12375
12375
|
*/
|
|
12376
|
-
async check(entityType, entityID, entityCreatorID, moderationPayload, configKey, options) {
|
|
12376
|
+
async check(entityType, entityID, entityCreatorID, moderationPayload, configKey, options, testMode) {
|
|
12377
12377
|
return await this.client.post(
|
|
12378
12378
|
this.client.baseURL + `/api/v2/moderation/check`,
|
|
12379
12379
|
{
|
|
@@ -12382,7 +12382,8 @@ var Moderation = class {
|
|
|
12382
12382
|
entity_creator_id: entityCreatorID,
|
|
12383
12383
|
moderation_payload: moderationPayload,
|
|
12384
12384
|
config_key: configKey,
|
|
12385
|
-
options
|
|
12385
|
+
options,
|
|
12386
|
+
test_mode: testMode
|
|
12386
12387
|
}
|
|
12387
12388
|
);
|
|
12388
12389
|
}
|
|
@@ -12429,9 +12430,9 @@ var Moderation = class {
|
|
|
12429
12430
|
moderationPayload,
|
|
12430
12431
|
"user_profile:default",
|
|
12431
12432
|
{
|
|
12432
|
-
force_sync: true
|
|
12433
|
-
|
|
12434
|
-
|
|
12433
|
+
force_sync: true
|
|
12434
|
+
},
|
|
12435
|
+
true
|
|
12435
12436
|
);
|
|
12436
12437
|
}
|
|
12437
12438
|
/**
|
|
@@ -16639,7 +16640,7 @@ var StreamChat = class _StreamChat {
|
|
|
16639
16640
|
if (this.userAgent) {
|
|
16640
16641
|
return this.userAgent;
|
|
16641
16642
|
}
|
|
16642
|
-
const version = "9.45.
|
|
16643
|
+
const version = "9.45.4";
|
|
16643
16644
|
const clientBundle = "browser-cjs";
|
|
16644
16645
|
let userAgentString = "";
|
|
16645
16646
|
if (this.sdkIdentifier) {
|