This page contains an overview of all relevant changes made to the Amity Chat SDK modules and the latest version releases
Reaction
Normalized API across the SDK
User
UserRepository.getAllUsers(sortBy?: EkoUserSortingMethod)
UserRepository.searchUserByDisplayName(search: string)
Added unreadCount in ChannelMembershipModel
exampleChannelMembershipModel.unreadCount;
Threaded messages:
MessageModel.parentId;
: Message ID of a parent message
MessageRepository.messagesForChannel
now allow parameters parentId: string
and filterByParentId: boolean
to perform queries on threads of messages
Reactions:
{ reactions: Object, reactionsCount: number, myReactions: string[] }
is added to MessageModel to support reactions
ReactorRepository(messageModel: MessageModel);
async ReactorRepository.addReaction(reactionName: string);
async ReactorRepository.removeReaction(reactionName: string);
A new Message Flagger Repository has been added and all message flagging has been moving to this repository:
MessageFlagRepository(messageId);
MessageFlagRepository.flag({ messageId });
MessageFlagRepository.unflag({ messageId });
You can check if you have flagged a message before
await MessageFlagRepository.isFlaggedByMe();
MessageModel now contains a cache for the isFlaggedByMe result
MessageModel.isFlaggedByMeCache;
You can now edit user metadata:
client.setUserMetadata({ test: "test" });
You can now filter channels by tags/excludingTags:
ChannelRepository.channelsWithFilters({ tags: [1,2,3], excludingTags: [4,5,6] });
You can now edit and delete message text:
MessageEditorRepository.editText('new edited text');
MessageEditorRepository.delete();
You can now read and unread channels:
ChannelMembershipRepository.startReading()
ChannelMembershipRepository.stopReading()
You can now be able to flag/unflag a message:
MessageRepository.flag({ messageId });
MessageRepository.unflag({ messageId });
You can now be able to flag/unflag a user:
UserRepository.flag({ userId });
UserRepository.unflag({ userId });
Fixed an issue with LiveObject and LiveCollection when they stop listen for updates from server after unregister/register. (case with SPA multiuser UI).
Enhanced Array.prototype.sort() comparison functions to be in sync with last updates in V8 (changes for sort()
already delivered in Chrome 70 and node-v11).