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.
@@ -4976,7 +4976,13 @@ var UserSearchSource = class extends BaseSearchSource {
4976
4976
  baseFilters: this.filters,
4977
4977
  context: { searchQuery }
4978
4978
  });
4979
- const sort = { id: 1, ...this.sort };
4979
+ let sort;
4980
+ if (Array.isArray(this.sort)) {
4981
+ const hasIdSort = this.sort.some((entry) => "id" in entry);
4982
+ sort = hasIdSort ? this.sort : [...this.sort, { id: 1 }];
4983
+ } else {
4984
+ sort = { id: 1, ...this.sort };
4985
+ }
4980
4986
  const options = { ...this.searchOptions, limit: this.pageSize, offset: this.offset };
4981
4987
  const { users } = await this.client.queryUsers(filters, sort, options);
4982
4988
  return { items: users };
@@ -10761,9 +10767,6 @@ var Channel = class {
10761
10767
  ...channelState.members,
10762
10768
  [memberCopy.user.id]: memberCopy
10763
10769
  };
10764
- if (channel.data?.member_count && event.type === "member.added") {
10765
- channel.data.member_count += 1;
10766
- }
10767
10770
  }
10768
10771
  const currentUserId = this.getClient().userID;
10769
10772
  if (typeof currentUserId === "string" && typeof memberCopy?.user?.id === "string" && memberCopy.user.id === currentUserId) {
@@ -10778,9 +10781,6 @@ var Channel = class {
10778
10781
  };
10779
10782
  delete newMembers[event.user.id];
10780
10783
  channelState.members = newMembers;
10781
- if (channel.data?.member_count) {
10782
- channel.data.member_count = Math.max(channel.data.member_count - 1, 0);
10783
- }
10784
10784
  }
10785
10785
  break;
10786
10786
  case "notification.mark_unread": {
@@ -16612,7 +16612,7 @@ var StreamChat = class _StreamChat {
16612
16612
  if (this.userAgent) {
16613
16613
  return this.userAgent;
16614
16614
  }
16615
- const version = "9.45.2";
16615
+ const version = "9.45.3";
16616
16616
  const clientBundle = "node-cjs";
16617
16617
  let userAgentString = "";
16618
16618
  if (this.sdkIdentifier) {