# TS SDK

**URL:** https://forum.social.plus/c/ts-sdk/10.md

[Latest](https://forum.social.plus/latest.md) · [Categories](https://forum.social.plus/categories.md) · [Tags](https://forum.social.plus/tags.md)

---

## [About the TS SDK category](https://forum.social.plus/t/about-the-ts-sdk-category/866)

<div class="topic-metadata">

**Author:** [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Replies:** 0

</div>

---

## [Querying Users by Role](https://forum.social.plus/t/querying-users-by-role/1826)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 1\
**Last updated:** [October 29, 2025, 2:48pm UTC](https://forum.social.plus/t/querying-users-by-role/1826 "2025-10-29T14:48:51Z")

</div>

Hi, I’m trying to find all the users that have role X. It doesn’t seem to accept role in the user query? Or am I mistaken? How should this be done?

---

## [getChannels doesn't return a conversation channel](https://forum.social.plus/t/getchannels-doesnt-return-a-conversation-channel/1822)

<div class="topic-metadata">

**Author:** [@Svrle](https://forum.social.plus/u/Svrle)\
**Replies:** 11\
**Last updated:** [October 29, 2025, 11:21am UTC](https://forum.social.plus/t/getchannels-doesnt-return-a-conversation-channel/1822 "2025-10-29T11:21:57Z")

</div>

We recently migrated to the TS SDK, and a few days ago we had a issue reported from production that they recieved a message in a channel refreshed the page and could never see the channel again. When we tested on our en…

---

## [Video Aspect Ratio](https://forum.social.plus/t/video-aspect-ratio/1820)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 1\
**Last updated:** [October 15, 2025, 10:54am UTC](https://forum.social.plus/t/video-aspect-ratio/1820 "2025-10-15T10:54:05Z")

</div>

When I upload portrait videos, they come back from the SDK in landscape with a border. How should I deal with this?

---

## [Image message doesn't return "caption"](https://forum.social.plus/t/image-message-doesnt-return-caption/1794)

<div class="topic-metadata">

**Author:** [@Svrle](https://forum.social.plus/u/Svrle)\
**Replies:** 3\
**Last updated:** [September 15, 2025, 6:10am UTC](https://forum.social.plus/t/image-message-doesnt-return-caption/1794 "2025-09-15T06:10:27Z")

</div>

“@amityco/ts-sdk”: “7.8.6” apiRegion = EU const imageMessage = { subChannelId: channelId, dataType: MessageContentType.IMAGE, fileId: file.fileId, caption: text, }; await MessageRepository.createMessage(imageMessage);…

---

## [Can't retrieve GlobalFeed in chronological order](https://forum.social.plus/t/cant-retrieve-globalfeed-in-chronological-order/1792)

<div class="topic-metadata">

**Author:** [@cindyconway](https://forum.social.plus/u/cindyconway)\
**Replies:** 1\
**Last updated:** [September 8, 2025, 7:07am UTC](https://forum.social.plus/t/cant-retrieve-globalfeed-in-chronological-order/1792 "2025-09-08T07:07:11Z")

</div>

SDK: @amityco/ts-sdk version 7.8.6 Problem: The global feed API is returning posts sorted by engagement level rather than chronological order, making it impossible to display ‘Most Recent’ posts. Expected Behavior: Pos…

---

## [Capitalization for searchUserByDisplayName](https://forum.social.plus/t/capitalization-for-searchuserbydisplayname/1782)

<div class="topic-metadata">

**Author:** [@cindyconway](https://forum.social.plus/u/cindyconway)\
**Replies:** 2\
**Last updated:** [September 5, 2025, 4:30pm UTC](https://forum.social.plus/t/capitalization-for-searchuserbydisplayname/1782 "2025-09-05T16:30:45Z")

</div>

There is a bug in the code for searchUserByDisplayName related to capitalization. It returns no matches if the search term is capitalizes even if the display names are capitalized. Sample display names in my instance: W…

---

## [Search Communities displayName 500000 ASC error](https://forum.social.plus/t/search-communities-displayname-500000-asc-error/1781)

<div class="topic-metadata">

**Author:** [@awareai-dev](https://forum.social.plus/u/awareai-dev)\
**Replies:** 3\
**Last updated:** [August 26, 2025, 6:38am UTC](https://forum.social.plus/t/search-communities-displayname-500000-asc-error/1781 "2025-08-26T06:38:45Z")

</div>

In my React Native app, I’m currently trying to add a search bar for my app’s communities. This is the relevant code for that. export const useCommunities = ({ membership, categoryId, includeDeleted, tags, sor…

---

## [Querying Left communities](https://forum.social.plus/t/querying-left-communities/1780)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 3\
**Last updated:** [August 25, 2025, 7:48am UTC](https://forum.social.plus/t/querying-left-communities/1780 "2025-08-25T07:48:28Z")

</div>

If I query communitites using the flag: membership ‘notMember’ A community appears if I have never joined it. But if I join and then leave, it disappears from this list, which means I can never re-join it?

---

## [Get all community posts by a user](https://forum.social.plus/t/get-all-community-posts-by-a-user/1783)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 3\
**Last updated:** [August 22, 2025, 2:47pm UTC](https://forum.social.plus/t/get-all-community-posts-by-a-user/1783 "2025-08-22T14:47:58Z")

</div>

Is there any way to query all the posts by a user, even if they are in commmunities?

---

## [React Native Push Notifications Approach](https://forum.social.plus/t/react-native-push-notifications-approach/1757)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 13\
**Last updated:** [August 12, 2025, 9:22am UTC](https://forum.social.plus/t/react-native-push-notifications-approach/1757 "2025-08-12T09:22:29Z")

</div>

I’m using the React Native SDK but building my own UI. What’s the recommended approach for getting push notifications working now? Can I get the direct push working or do I need to build a service and use the webhook a…

---

## [Inconsistent Notification Tray Items Across Users](https://forum.social.plus/t/inconsistent-notification-tray-items-across-users/1772)

<div class="topic-metadata">

**Author:** [@Sowmya](https://forum.social.plus/u/Sowmya)\
**Replies:** 1\
**Last updated:** [August 7, 2025, 4:01am UTC](https://forum.social.plus/t/inconsistent-notification-tray-items-across-users/1772 "2025-08-07T04:01:47Z")

</div>

We’re encountering an issue with the Notification Tray feature where some users are unable to view any notifications, while others can view them without any problems — despite having similar roles and permissions. Here …

---

## [Global Feed SDK Pagination](https://forum.social.plus/t/global-feed-sdk-pagination/1770)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 4\
**Last updated:** [August 5, 2025, 9:33am UTC](https://forum.social.plus/t/global-feed-sdk-pagination/1770 "2025-08-05T09:33:43Z")

</div>

The global feed FeedRepository.queryGlobalFeed doesn’t seem to have the pagination functions that the other query functions do. onNextPage, hasNextPage are always undefined. How should I paginate this feed?

---

## [community query params don't seem to be working](https://forum.social.plus/t/community-query-params-dont-seem-to-be-working/1754)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 1\
**Last updated:** [July 16, 2025, 3:24pm UTC](https://forum.social.plus/t/community-query-params-dont-seem-to-be-working/1754 "2025-07-16T15:24:21Z")

</div>

I’m trying to query communities by tags. They are called categories in the portal but I guess they are the same thing? Using the following code but it’s always coming back empty: const unSubscriber = CommunityRepos…

---

## [Global feed Live version](https://forum.social.plus/t/global-feed-live-version/1748)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 1\
**Last updated:** [June 17, 2025, 6:22am UTC](https://forum.social.plus/t/global-feed-live-version/1748 "2025-06-17T06:22:04Z")

</div>

The FeedRepository.queryGlobalFeed doesn’t seem to have a live version like the others? Is there another way to get this? If I comment on a post for example the comment counts don’t update. I guess the posts themselves …

---

## [Help with Notification Tray – totalUnreadCount is always zero for post creation](https://forum.social.plus/t/help-with-notification-tray-totalunreadcount-is-always-zero-for-post-creation/1715)

<div class="topic-metadata">

**Author:** [@Sowmya](https://forum.social.plus/u/Sowmya)\
**Replies:** 10\
**Last updated:** [June 13, 2025, 6:27am UTC](https://forum.social.plus/t/help-with-notification-tray-totalunreadcount-is-always-zero-for-post-creation/1715 "2025-06-13T06:27:10Z")

</div>

Hi, We’ve enabled the notification tray feature for our application and are currently integrating it. Authentication is working as expected—we’re retrieving a valid access token for User A1 and using it to call the API…

---

## [Incorrect unread message count](https://forum.social.plus/t/incorrect-unread-message-count/1736)

<div class="topic-metadata">

**Author:** [@jfiejka](https://forum.social.plus/u/jfiejka)\
**Replies:** 11\
**Last updated:** [June 12, 2025, 9:24am UTC](https://forum.social.plus/t/incorrect-unread-message-count/1736 "2025-06-12T09:24:15Z")

</div>

Despite calling the markAsRead method on all chats (I have two), Client.getUserUnread returns an incorrect value of 1. I wanted to be extra sure, that I’m not missing anything so I also did the same for evety single mess…

---

## [\[Error: Amity SDK (500000): skip, limit and sorting are not supported in query type scrollable\]](https://forum.social.plus/t/error-amity-sdk-500000-skip-limit-and-sorting-are-not-supported-in-query-type-scrollable/1741)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 3\
**Last updated:** [June 9, 2025, 1:36pm UTC](https://forum.social.plus/t/error-amity-sdk-500000-skip-limit-and-sorting-are-not-supported-in-query-type-scrollable/1741 "2025-06-09T13:36:44Z")

</div>

I’m getting the error above trying to get comments using the TS SDK in react native. My code is below which seems correct…? const unSubscribe = CommentRepository.getComments( { referenceType, referenceId, },…

---

## [Am I following a user](https://forum.social.plus/t/am-i-following-a-user/1739)

<div class="topic-metadata">

**Author:** [@BenGannaway](https://forum.social.plus/u/BenGannaway)\
**Replies:** 1\
**Last updated:** [June 5, 2025, 9:29am UTC](https://forum.social.plus/t/am-i-following-a-user/1739 "2025-06-05T09:29:00Z")

</div>

What’s the easiest way to determine if I (currently logged in user) am following another user? Using Typescript SDK

---

## [restore deleted posts](https://forum.social.plus/t/restore-deleted-posts/1718)

<div class="topic-metadata">

**Author:** [@abrown1916](https://forum.social.plus/u/abrown1916)\
**Replies:** 2\
**Last updated:** [April 24, 2025, 1:07pm UTC](https://forum.social.plus/t/restore-deleted-posts/1718 "2025-04-24T13:07:31Z")

</div>

Hi team, I see that deletePost performs a soft delete based on the SDK documentation, but I haven’t been able to find any documentation or method for how to restore a post that’s been soft deleted. Is there currently a…

---

## [FileRepository.uploadVideo 500/502 timeout error](https://forum.social.plus/t/filerepository-uploadvideo-500-502-timeout-error/1697)

<div class="topic-metadata">

**Author:** [@Radek](https://forum.social.plus/u/Radek)\
**Replies:** 16\
**Last updated:** [April 24, 2025, 5:25am UTC](https://forum.social.plus/t/filerepository-uploadvideo-500-502-timeout-error/1697 "2025-04-24T05:25:49Z")

</div>

Hello Social Plus Team, I have encountered an issue with uploading videos using the amityco/ts-sdk. While uploads work correctly for smaller files or with higher Internet upload speeds, problems arise with larger files …

---

## [\[Amity File Repository\] method 'fileUrlWithSize' is not working as expected](https://forum.social.plus/t/amity-file-repository-method-fileurlwithsize-is-not-working-as-expected/1208)

<div class="topic-metadata">

**Author:** [@aleksey.k](https://forum.social.plus/u/aleksey.k)\
**Replies:** 4\
**Last updated:** [April 23, 2025, 9:17pm UTC](https://forum.social.plus/t/amity-file-repository-method-fileurlwithsize-is-not-working-as-expected/1208 "2025-04-23T21:17:32Z")

</div>

Hello, I was trying to get image thumbnail image for my video upload as per documentation. I am using this code: import { FileRepository } from '@amityco/ts-sdk'; function getVideoImageThumbnail() { const videoImage…

---

## [Follow status/ Connection status](https://forum.social.plus/t/follow-status-connection-status/1710)

<div class="topic-metadata">

**Author:** [@alustoDev](https://forum.social.plus/u/alustoDev)\
**Replies:** 2\
**Last updated:** [April 8, 2025, 6:19am UTC](https://forum.social.plus/t/follow-status-connection-status/1710 "2025-04-08T06:19:38Z")

</div>

There is mention in the documentation about being able to see the connection status between the client (logged in user) and another user but It doesnt list how to achieve this? Is the only way to get the users followings…

---

## [CreateImage API Error](https://forum.social.plus/t/createimage-api-error/1686)

<div class="topic-metadata">

**Author:** [@EmmanKusumi](https://forum.social.plus/u/EmmanKusumi)\
**Replies:** 3\
**Last updated:** [March 12, 2025, 6:45am UTC](https://forum.social.plus/t/createimage-api-error/1686 "2025-03-12T06:45:52Z")

</div>

Hi I am trying to create an image to the server, but I am always getting an error. Here is the sample code: let response = await fetch(path); var blob = await response.blob(); var file = new File(\[blob\], "image.jpg", {…

---

## [TypeError: Cannot convert undefined or null to object - createMessage method](https://forum.social.plus/t/typeerror-cannot-convert-undefined-or-null-to-object-createmessage-method/1606)

<div class="topic-metadata">

**Author:** [@Radek](https://forum.social.plus/u/Radek)\
**Replies:** 14\
**Last updated:** [February 21, 2025, 1:39pm UTC](https://forum.social.plus/t/typeerror-cannot-convert-undefined-or-null-to-object-createmessage-method/1606 "2025-02-21T13:39:02Z")

</div>

Hello Social Plus team, We’ve recently observed a strange error in Sentry related to our chat module: Uncaught (in promise) TypeError: Cannot convert undefined or null to object I’ve reviewed my code and everything…

---

## [Querying and sorting posts/communities by fields in custom data](https://forum.social.plus/t/querying-and-sorting-posts-communities-by-fields-in-custom-data/1636)

<div class="topic-metadata">

**Author:** [@dmitryvm](https://forum.social.plus/u/dmitryvm)\
**Replies:** 1\
**Last updated:** [February 11, 2025, 10:07am UTC](https://forum.social.plus/t/querying-and-sorting-posts-communities-by-fields-in-custom-data/1636 "2025-02-11T10:07:48Z")

</div>

Hello, Support Team! On our website, we have events and challenges, both with a creationDate and a startDate. I store challenges as custom posts, with startDate saved in the post.data section. We also have a UI element …

---

## [Live channels and realtime events](https://forum.social.plus/t/live-channels-and-realtime-events/1607)

<div class="topic-metadata">

**Author:** [@jfiejka](https://forum.social.plus/u/jfiejka)\
**Replies:** 1\
**Last updated:** [February 7, 2025, 10:04am UTC](https://forum.social.plus/t/live-channels-and-realtime-events/1607 "2025-02-07T10:04:30Z")

</div>

Hello, In my use case, I use live channels instead of conversations for group chats. This is because the conversation type lacks the functionalities I need and limits me to only 10 users. I display a list of channels (…

---

## [Messages not updated even already subscribed subchannel](https://forum.social.plus/t/messages-not-updated-even-already-subscribed-subchannel/1596)

<div class="topic-metadata">

**Author:** [@new.suppawit](https://forum.social.plus/u/new.suppawit)\
**Replies:** 3\
**Last updated:** [February 6, 2025, 4:45am UTC](https://forum.social.plus/t/messages-not-updated-even-already-subscribed-subchannel/1596 "2025-02-06T04:45:12Z")

</div>

I have implemented live chat application as web app. I using getMessages function from sdk to get the collection of messages. I also create code to subscribed the subchannel to get an updated collection of message but me…

---

## [CommunityRepository.getCommunities returns an empty array](https://forum.social.plus/t/communityrepository-getcommunities-returns-an-empty-array/1585)

<div class="topic-metadata">

**Author:** [@dmitryvm](https://forum.social.plus/u/dmitryvm)\
**Replies:** 5\
**Last updated:** [January 28, 2025, 11:09am UTC](https://forum.social.plus/t/communityrepository-getcommunities-returns-an-empty-array/1585 "2025-01-28T11:09:48Z")

</div>

I have 2 public communities in the console panel. Using same user that created the communities and the following code: CommunityRepository.getCommunities( {}, ({ data: communities, loading, error }) =\> { i…

---

## [getChannels doesn't return a channel](https://forum.social.plus/t/getchannels-doesnt-return-a-channel/1584)

<div class="topic-metadata">

**Author:** [@bianca](https://forum.social.plus/u/bianca)\
**Replies:** 3\
**Last updated:** [January 28, 2025, 6:37am UTC](https://forum.social.plus/t/getchannels-doesnt-return-a-channel/1584 "2025-01-28T06:37:00Z")

</div>

there is one channel not being returned by this method. It only gets returned if I send its channelId const unsubscriber = ChannelRepository.getChannels( { limit: 100, isDeleted: false, sortBy: 'displayNam…

[Next page](https://forum.social.plus/c/ts-sdk/10.md?page=1)
