Comment on page
TypeScript
This page contains an overview of all relevant changes made to the TypeScript SDK and the latest version releases
- Enhaced message live collection performance and stablity.
- Fixed the issue where next page of
getChannels
live collection couldn't be called - Fixed the issue where next page of
getUsers
live collection couldn't be called
- Fixed the issue where next page of
getComments
live collection couldn't be called
- Added a new feature for SDK to collect and view data of post interaction. For more information, please visit Post Impression.
- Fixed the issue of isReportedByMe doesn't return a result.
- Fixed no response from observe following follower.
- NodeJS >= v12
- NPM >= v6
- Added new feature to preview latest message sent in channel or subchannel. For more information, please visit Message Preview.
- Fixed the issue of post filtering error.
- Fixed the issue to mark channel as read to clear unreadCount.
- Fixed the issue of community channel type.
- NodeJS >= v12
- NPM >= v6
- Fixed the issue where more than 5 comments could not be retrieved.
- Fixed the issue of sub-channel pagination.
- Fixed the issue where there was no response when flagging a comment.
- NodeJS >= v12
- NPM >= v6
- Fix various bugs in comments.
- Fix channel not re-ordering when got a new message.
- NodeJS >= v12
- NPM >= v6
- Fixed an issue where unread count doesn't get updated in real-time in certain situations.
- Improved authentication performance.
- Fixed an issue in the
MessagesRepository.getMessages
function where the results were incorrectly sorted in certain situations. - Fixed an issue in the
MessagesRepository.getMessages
function where results became mixed when using two message live collections simultaneously. - Fixed the
CommentRepository.getComments
function, which was always including replied comments at the same level as parent comments.
- Fixed the issue where deviceId is not unique among SDK session.
- Introduced
hasMentioned
field inAmity.Channel
. - Introduced
hasMentioned
field inAmity.SubChannel
. - Introduced
userUnread: Amity.UserUnread
property inAmity.Client
toget unreadCount
andhasMentioned
value. - Enhanced the Comments API Response to return community users' roles.
- Fixed the missing 'Read' status on some messages in 1-1 chat.
- Fixed the issue where onNextPage() cannot be called on multiple channel live collections.
- Fixed the issue where subChannel was not re-ordered after receiving a new message.
- Fixed the issue of calling multiple get channel marker requests after creating a new channel.
- Fixed the issue where onNextPage() cannot be called on multiple message live collections.
- Fixed notification message is empty when sent a messgage from TypeScript SDK.
- Fixed the missing 'Read' status on some messages in 1-1 chat.
- Prevented excessive unread sync requests in some situations.
- Fixed missing "read" status on some messages.
- Fixed the issue where live collections were unable to call onNextPage on multiple collections.
- Fixed pagination for sub-channels.
- Resolved a message order issue.
- Fixed the issue with sub-channel sorting not updating after receiving a message.
- Updated the logic for
PostRepository.delete()
to guarantee the cache's permanent removal in the case of a hard delete. Also, limitedPostRepository.getPosts()
to exclude all deleted posts (both soft and hard deletes) not owned by the logged-in user, aligning with thisbehavioral-change-announcement.
- Fixed the issue of missing parameter,
referenceVersion
, in reaction query.
- Fixed the issue where we could not see the users' reacted list with the message in the topic, and the backend returned '
MessageId
not found.' However, the reaction count showed the correct number of reactions.
- In version 6.5.2, we fixed a bug related to missing reactions in posts. Despite resolving this in most cases, some specific scenarios were still affected. With this release, we have addressed the remaining issues, ensuring that reactions will be displayed correctly in all situations.
- Fixed the issue with reactions where users are unable to see who reacted to the message.
- Fixed the issue where
myReactions
in the post were incorrect. When the user re-initializes a new collection,myReactions
are correct for the firstgetPosts(..)
call. However, they become incorrect again once another user likes the post.
- Fixed the issue where searching for communities by
displayName
was not working. - Fixed the issue where searching for users by
displayName
returned mixed-up and incorrect data.
Stream Repository
- Introduced
StreamRepository.getStream()
Live Object API. - Introduced
StreamRepository.getStreams()
Live Collection API.
Community Repository
- Introduced
CommunityRepository.getCommunity()
Live Object API. - Introduced
CommunityRepository.getCommunities()
Live Collection API. - Introduced
CommunityRepository.getTrendingCommunity()
Live Collection API. - Introduced
CommunityRepository.getRecommendedCommunities()
Live Collection API.
Channel Repository
- Introduced
ChannelRepository.Membership.getMembers()
Live Collection API.
Post Repository
- Introduced
PostRepository.getPost()
Live Object API. - Introduced
PostRepository.getPosts()
Live Collection API.
Poll Repository
- Introduced
PollRepository.getPoll()
Live Object API.
Comment Repository
- Introduced
CommentRepository.getComment()
Live Object API. - Introduced
CommentRepository.getComments()
Live Collection API.
Stream Repository
- Made cache key unique per request params in getStreams.
- Fixed the issue where the unread count does not sync when two devices, both using the same account, are opened simultaneously.
- Resolved an issue, ensuring that the comment model accurately updates myReaction when adding or removing a reaction.
- Resolved an issue, ensuring that the comment model accurately updates myReaction when adding a new reaction and re-querying the comment.
- Introduce a new feature which now supports unread count on multiple devices. When the user logs in to two devices with the same account and uses the chat feature simultaneously, the user should see the correct update of the unread count.
- Fixed after subscribing to the real-time comment event, the reaction should reflect in Live Objects and Live Collections correctly, ensuring that it increases and decreases normally.
- Fixed an issue where the SDK shared the same message result on MessageRepository.getMessages, even with different page sizes.
- Rectified inaccurate search results when searching for users and communities.
- Fix the issue where the latest messages or chat lists are not displayed in real-time. The page needs to be refreshed to see the updates.
- Fix post live collection does't trigger callback again on re-initialize.
- Fix post live collection does't trigger callback again on re-initialize.
- Introduce ban/unban community member.
- Fix user objects are not returned when searching with display name.
- Fix post is not disappeared in real-time when performing hard delete.
- Fix sometimes
ChannelRepository.Membership.getMembers
returns null.
- Introduce mute/unmute channel.
- Remove unused warnings (
runQuery
deprecations). - Fix sometimes message and channel collections return empty.
- Introduce message delivered count.
- Introduce mark all messages in a channel as read
- Fixed an issue where Live collections including
liveMessage
,liveChannels
,livePosts
, andliveComments
do not get updated immediately once the new item is created in to the collection.
- introduced Live Object for
liveGetMyFollowInfo
method. liveGetFollowInfo
now returns more data, including the follow status between the target user and the SDK method caller. You can learn more about this update here.
- fixed the issue when calling
liveMessages
for the second time and return an empty result.
- Fixed an issue where creating a message was returning a parameters validation error
- Fixed an issue where the authentication token wasn't able to be renewed when it's about to expire or has expired
- Introduced Live Object for the Live Community Objects. With
liveCommunity
, any changes made to the community object are immediately reflected, without the need for the user to manually refresh or update the object. - Introduced Live Community Members. Any real-time event data changes to a collection of community members will immediately be reflected in the collection without the need for users to query the server again for the latest data.
- Enhanced liveUsers functionality to query users by query parameters such as
displayName
,lastCreated
andfirstCreated
.
- Fixed issue where a post was not being added to the review feed when a previously published post was updated.
- Fixed issue where the member count was not automatically updated after joining a live channel.
- Enhanced Live Collection with Post, Comments, Community and Community Category collection. Newly created Posts, Comments, Communities, and Community Categories are now automatically reflected in their respective collections, providing real-time updates.
- Fixed issue where the device status was not changed to '
established
' after the token expired. - Fixed issue where the user could not filter the channel by "member" and the removed channel was still shown in the collection after removal.
- Fixed issue where the SDK did not subscribe to the global ban event.
- Fixed issue where the user adds a new post but it is not linked to the user who created it.
- Replaced
channelId
,data
parameters withsubChannelId
,dataType
forcreateMessage
,queryMessages
,liveMessages
before:
const query = createQuery(createMessage, {
channelId,
data: 'text',
...
});
const query = createQuery(queryMessages, {
channelId,
...
});
const unsubscribe = liveMessages({ channelId }, callback);
starting 0.0.1 Beta.36:
const query = createQuery(createMessage, {
subChannelId,
dataType: 'text',
...
});
const query = createQuery(queryMessages, {
subChannelId,
...
});
const unsubscribe = liveMessages({ subChannelId }, callback);
fileId
for file, image, video, audio messages is moved frommessage.fileId
tomessage.data.fileId
- Before, messages were sent into the channel. Now, messages are sent into the sub channels of the channel. Each channel has at least one sub channel, the main one, where all old messages were migrated. To keep querying, creating messages in the same space use
channel.defaultSubChannelId
forsubChannelId
parameter forcreateMessage
,queryMessages
,liveMessages
before:
const unsubscribe = liveMessages({ channelId: channel.channelId }, callback);
starting 0.0.1 Beta.36:
const unsubscribe = liveMessages({ subChannelId: channel.defaultSubChanneld }, callback);
- to receive real time updates for channel of type
broadcast
,live
, it's sub channels and messages (keepliveMessages
working) you need manually to subscribe for them
import { getChannelTopic, subscribeTopic } from '@amityco/ts-sdk';
let unsubscribe;
runQuery(
createQuery(getChannel, 'channelId'),
({ data: channel, loading, error }) => {
if (loading && error) {
return;
}
unsubscribe = subscribeTopic(getChannelTopic(channel));
},
);
- SDK Upgrade
- Fixed issue where unread messages did not show the correct number.
- Upgraded the post review feature. When a moderator role is demoted to a user role, post creation must be approved by a moderator.
- Fixed issue where the user could not remove reaction from the message.
- Introduced
liveMessage
andliveUser
. Now users can monitor the status of a single message, post or user if they are subscribed.
- Fixed issue where querying the Live channel membership filter after muting was not possible.
- Enhanced Live Collections for Channel Member collections. Any member added to or removed from a channel is automatically included in the query collection.
- When creating a poll post, the
closedIn
value is set to 30 days by default if the user does not set any value.
- Introduced ability to manage community post settings via SDK (i.e. 'Only Admins Can Post' or 'Approve Member Posts')
- Non-members with the User role can no longer be able to get information about the conversation channel.
- Non-members with the User role can no longer query messages within the conversation channel.
- Enhanced LiveCollections for Message collection, Followers/Following collection. Newly created messages and new followers are now automatically reflected in their respective collections.
- Enhanced Video on Demand (VOD) configurations. Videos you upload with our SDK can now be transcoded to 4 different resolutions (from 360p to 1080p) with a maximum file size of 1 GB and a duration of up to 2 hours.
- Enhanced LiveCollections for message reactions. Newly created reactions are now automatically added into the collection.
- Enhanced LiveCollections for comments collection. Newly added comments are now automatically added into the collection
- Fixed issue where two different
messageIds
were being returned when attempting to create a new message
- queryReactions pagination parameters changed from
{limit: number; after: number;}
to{limit: number; before: string}
whichbefore
should bereferenceId
- Introduced
onPollUpdated
feature that allows to receive reactive callback when a user chooses to Vote, Close and Delete on a poll.
- Fixed issue where tags cannot be updated on a channel if new parameter is sent
- SDK Upgrade
- Fixed issue with
myReactions
array disappearing when message was updated - Fixed issue with messages being created multiple times
- Fixed issue with comment sorting
- Fixed issue with
Amity.Message<"text">
function being replaced by "never" - Added missing type for
isDeleted
parameter inqueryChannels
- Added missing type for
contentDataPoll
- Support tags in chat
- Passed the channel member model to the related channel member event callback
- When a user log in with only a ‘user id’, the user's display name will no longer be replaced with the user id.
- Fixed picture rotation issue when uploading an image in chat
- Ability to filter channels by tags.
- New createImage function to upload images.
- createPoll Typo
- Ability to create, update and delete poll post.
- Ability to vote poll post.
- Ability to mention user in poll post
- Regex related to Real Time Event to support in android low end devices.
- Accessing global object on all ends
- Realtime events for comments and posts in User feed
- Add
tag
type property in Post model - Upload video in posts and messages
- Change
addCommunityMembersRole
toaddCommunityMembersRoles
and the second parameter(roles) should be sent as array
addCommunityMembersRole(communityId, 'admin', ['user1', 'user2'])
Starting v0.0.1-beta.17
addCommunityMembersRoles(communityId, ['admin'], ['user1', 'user2'])
- Change
removeCommunityMembersRole
toremoveCommunityMembersRoles
and the second parameter(roles) should be sent as array
removeCommunityMembersRole(communityId, 'admin', ['user1', 'user2'])
Starting v0.0.1-beta.17
removeCommunityMembersRoles(communityId, ['admin'], ['user1', 'user2'])
- const [options, setOptions] =useState<Amity.RunQueryOptions<typeof queryMessages>>();
- Resolve undefined
API_ENDPOINT
by addingAPI_REGIONS
constant - Fix observers callback type
- Mention individual users in chat
- Paging type issue in query methods ( i.e.
queryPosts
,queryComments
,queryMessages
,queryChannels
,queryCommunities
) - Incorrect type returned in
runQuery
response
- User can leave Community
- Ability to report unnecessary Comments
- Ability to report unnecessary Posts
- User can edit or update one's own Posts
- Mention users in Comments
- Mention users in Posts (text, image, file, and audio posts)
- Ability to comment and reply in Posts
- User can invite and dismiss Community Members
- Ability to create a private/public Community
- Only the first observable can call the
update
callback if there are more than one observables listening to the same event simultaneously - Unhandled exception if connection is closed without error instance
Due to current limitation, we encounter observers call duplication. We are working on fixing this issue for the next release.
- Get user function issues
- New Internal Cache System
- Query Users Caching
runQuery
algorithm is revamped so that it reads better, and includes constantly loading/origin values with meaning- All API endpoints will return at least an
Amity.Cached
Due to a technical issue,prevPage
andnextPage
are not available in the returned interface for queries including pagination. A temporary fix is to use// @ts-ignore
to avoid typing error. A fix for this issue will be available in our next release.
- Run latest version with MQTT support on react-native
clearCache
function is renamed todisableCache
Amity.QueryMetadata
is deprecated, use Amity.SnapshotOptions instead