TypeScript
This page contains an overview of all relevant changes made to the TypeScript SDK and the latest version releases
- 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- Returned data from
runQuery
is changed from an object with keys to an array of items
- SDK Upgrade
- SDK Upgrade
- SDK Upgrade
- Global ban error handling
- Channel Types Filter for querying Channels
Initial beta release. Included the following Chat features:
- Create Text, Image, and File Messages
- Flag and Unflag Messages
- Query and Get Messages
- Update and Delete Messages
- Add and Remove Reaction from Messages
- Join and Leave Channels
- Create Channels
- Query and Get Channels
Last modified 7d ago