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.
@@ -4790,7 +4790,13 @@ var UserSearchSource = class extends BaseSearchSource {
4790
4790
  baseFilters: this.filters,
4791
4791
  context: { searchQuery }
4792
4792
  });
4793
- const sort = { id: 1, ...this.sort };
4793
+ let sort;
4794
+ if (Array.isArray(this.sort)) {
4795
+ const hasIdSort = this.sort.some((entry) => "id" in entry);
4796
+ sort = hasIdSort ? this.sort : [...this.sort, { id: 1 }];
4797
+ } else {
4798
+ sort = { id: 1, ...this.sort };
4799
+ }
4794
4800
  const options = { ...this.searchOptions, limit: this.pageSize, offset: this.offset };
4795
4801
  const { users } = await this.client.queryUsers(filters, sort, options);
4796
4802
  return { items: users };
@@ -10575,9 +10581,6 @@ var Channel = class {
10575
10581
  ...channelState.members,
10576
10582
  [memberCopy.user.id]: memberCopy
10577
10583
  };
10578
- if (channel.data?.member_count && event.type === "member.added") {
10579
- channel.data.member_count += 1;
10580
- }
10581
10584
  }
10582
10585
  const currentUserId = this.getClient().userID;
10583
10586
  if (typeof currentUserId === "string" && typeof memberCopy?.user?.id === "string" && memberCopy.user.id === currentUserId) {
@@ -10592,9 +10595,6 @@ var Channel = class {
10592
10595
  };
10593
10596
  delete newMembers[event.user.id];
10594
10597
  channelState.members = newMembers;
10595
- if (channel.data?.member_count) {
10596
- channel.data.member_count = Math.max(channel.data.member_count - 1, 0);
10597
- }
10598
10598
  }
10599
10599
  break;
10600
10600
  case "notification.mark_unread": {
@@ -12160,7 +12160,7 @@ var Moderation = class {
12160
12160
  * @param options
12161
12161
  * @returns
12162
12162
  */
12163
- async check(entityType, entityID, entityCreatorID, moderationPayload, configKey, options) {
12163
+ async check(entityType, entityID, entityCreatorID, moderationPayload, configKey, options, testMode) {
12164
12164
  return await this.client.post(
12165
12165
  this.client.baseURL + `/api/v2/moderation/check`,
12166
12166
  {
@@ -12169,7 +12169,8 @@ var Moderation = class {
12169
12169
  entity_creator_id: entityCreatorID,
12170
12170
  moderation_payload: moderationPayload,
12171
12171
  config_key: configKey,
12172
- options
12172
+ options,
12173
+ test_mode: testMode
12173
12174
  }
12174
12175
  );
12175
12176
  }
@@ -12216,9 +12217,9 @@ var Moderation = class {
12216
12217
  moderationPayload,
12217
12218
  "user_profile:default",
12218
12219
  {
12219
- force_sync: true,
12220
- test_mode: true
12221
- }
12220
+ force_sync: true
12221
+ },
12222
+ true
12222
12223
  );
12223
12224
  }
12224
12225
  /**
@@ -16426,7 +16427,7 @@ var StreamChat = class _StreamChat {
16426
16427
  if (this.userAgent) {
16427
16428
  return this.userAgent;
16428
16429
  }
16429
- const version = "9.45.2";
16430
+ const version = "9.45.4";
16430
16431
  const clientBundle = "browser-esm";
16431
16432
  let userAgentString = "";
16432
16433
  if (this.sdkIdentifier) {