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.
- package/dist/cjs/index.browser.js +8 -8
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +8 -8
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +8 -8
- package/dist/esm/index.mjs.map +2 -2
- package/package.json +1 -1
- package/src/channel.ts +0 -7
- 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": {
|
|
@@ -16639,7 +16639,7 @@ var StreamChat = class _StreamChat {
|
|
|
16639
16639
|
if (this.userAgent) {
|
|
16640
16640
|
return this.userAgent;
|
|
16641
16641
|
}
|
|
16642
|
-
const version = "9.45.
|
|
16642
|
+
const version = "9.45.3";
|
|
16643
16643
|
const clientBundle = "browser-cjs";
|
|
16644
16644
|
let userAgentString = "";
|
|
16645
16645
|
if (this.sdkIdentifier) {
|