@amityco/ts-sdk 7.8.6-4b6075d.0 → 7.8.6-bba903e4.0

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/index.cjs.js CHANGED
@@ -6614,10 +6614,10 @@ const getMyMembership = (channelId, callback) => {
6614
6614
  const channelLinkedObject = (channel) => {
6615
6615
  var _a;
6616
6616
  let previewMembers = [];
6617
- if (['conversation', 'community'].includes(channel.type)) {
6617
+ if (channel.type === 'conversation') {
6618
6618
  const channelUsers = queryCache(['channelUsers', 'get']);
6619
6619
  if (channelUsers && (channelUsers === null || channelUsers === void 0 ? void 0 : channelUsers.length) > 0) {
6620
- previewMembers = ((_a = channelUsers === null || channelUsers === void 0 ? void 0 : channelUsers.filter(({ data }) => data.channelId === channel.channelId && data.membership !== 'none')) !== null && _a !== void 0 ? _a : [])
6620
+ previewMembers = ((_a = channelUsers === null || channelUsers === void 0 ? void 0 : channelUsers.filter(({ data }) => data.channelId === channel.channelId)) !== null && _a !== void 0 ? _a : [])
6621
6621
  // sort in ascending order by userInternalId
6622
6622
  .sort((a, b) => a.data.userInternalId.localeCompare(b.data.userInternalId))
6623
6623
  // Select only first 4 members
@@ -14004,7 +14004,7 @@ class SearchUserPaginationController extends PaginationController {
14004
14004
  const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT, displayName } = queryParams, params = __rest(queryParams, ["limit", "displayName"]);
14005
14005
  const options = token ? { token } : { limit };
14006
14006
  const { data: queryResponse } = await this.http.get(`/api/v3/users`, {
14007
- params: Object.assign(Object.assign({}, params), { keyword: displayName, options, isDeleted: false }),
14007
+ params: Object.assign(Object.assign({}, params), { keyword: displayName === null || displayName === void 0 ? void 0 : displayName.toLocaleLowerCase(), options, isDeleted: false }),
14008
14008
  });
14009
14009
  return queryResponse;
14010
14010
  }
package/dist/index.esm.js CHANGED
@@ -22706,10 +22706,10 @@ const getMyMembership = (channelId, callback) => {
22706
22706
  const channelLinkedObject = (channel) => {
22707
22707
  var _a;
22708
22708
  let previewMembers = [];
22709
- if (['conversation', 'community'].includes(channel.type)) {
22709
+ if (channel.type === 'conversation') {
22710
22710
  const channelUsers = queryCache(['channelUsers', 'get']);
22711
22711
  if (channelUsers && (channelUsers === null || channelUsers === void 0 ? void 0 : channelUsers.length) > 0) {
22712
- previewMembers = ((_a = channelUsers === null || channelUsers === void 0 ? void 0 : channelUsers.filter(({ data }) => data.channelId === channel.channelId && data.membership !== 'none')) !== null && _a !== void 0 ? _a : [])
22712
+ previewMembers = ((_a = channelUsers === null || channelUsers === void 0 ? void 0 : channelUsers.filter(({ data }) => data.channelId === channel.channelId)) !== null && _a !== void 0 ? _a : [])
22713
22713
  // sort in ascending order by userInternalId
22714
22714
  .sort((a, b) => a.data.userInternalId.localeCompare(b.data.userInternalId))
22715
22715
  // Select only first 4 members
@@ -30096,7 +30096,7 @@ class SearchUserPaginationController extends PaginationController {
30096
30096
  const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT, displayName } = queryParams, params = __rest(queryParams, ["limit", "displayName"]);
30097
30097
  const options = token ? { token } : { limit };
30098
30098
  const { data: queryResponse } = await this.http.get(`/api/v3/users`, {
30099
- params: Object.assign(Object.assign({}, params), { keyword: displayName, options, isDeleted: false }),
30099
+ params: Object.assign(Object.assign({}, params), { keyword: displayName === null || displayName === void 0 ? void 0 : displayName.toLocaleLowerCase(), options, isDeleted: false }),
30100
30100
  });
30101
30101
  return queryResponse;
30102
30102
  }