stream-chat 9.45.2 → 9.45.3

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": {
@@ -16426,7 +16426,7 @@ var StreamChat = class _StreamChat {
16426
16426
  if (this.userAgent) {
16427
16427
  return this.userAgent;
16428
16428
  }
16429
- const version = "9.45.2";
16429
+ const version = "9.45.3";
16430
16430
  const clientBundle = "browser-esm";
16431
16431
  let userAgentString = "";
16432
16432
  if (this.sdkIdentifier) {