Releases: cometchat/chat-sdk-javascript
Releases · cometchat/chat-sdk-javascript
v4.1.4
New
- Introduced a
setPage(pageNumber: number)method in the Request Builder. This gives developers more flexibility by allowing them to define a specific starting page (pivot) for pagination. After setting the page, the next call tofetchNextwill load the following page in sequence and continue from there.
Enhancements
- None
Fixes
- None
v4.1.3
New
- None
Enhancements
- Added the
setStatusmethod in the Group Member Request Builder, allowing developers to filter group members based on their status. - Added the
setHideAgenticandsetOnlyAgenticmethods in the Conversation Request Builder, enabling developers to filter and retrieve only agent-related conversations. - Added the
setStorageModemethod, allowing developers to choose between session and local storage for managing stored data.
Fixes
- None
v4.1.2
New
- Added
getQuotedMessageId()andsetQuotedMessageId()methods to theBaseMessageclass for retrieving and assigning the ID of a quoted message. - Introduced
getQuotedMessage()andsetQuotedMessage()in theBaseMessageclass to get or set the quoted message object. - Introduced
hideQuotedMessages()in theMessageRequestBuilderclass to configure whether quoted messages should be included in the response. - Added
isHideQuotedMessages()to theMessageRequestclass to check whether quoted messages are excluded from the response.
Enhancements
- None
Fixes
- None
v4.1.1
New
- Added a new method
onMessageModeratedin the MessagesListener class. This method is triggered when a message sent by the logged-in user is successfully processed by moderation and receives either anapprovedordisapprovedstatus. - Introduced a new
getModerationStatus()method in both TextMessage and MediaMessage classes, allowing users to check the moderation status of their messages. - Added a new ModerationStatus enum that includes the following states:
pendingapproveddisapprovedunmoderated(default for apps without moderation enabled)
Enhancements
- None
Fixes
- None
v4.1.0
New
-
Added AI Assistant Event Classes to provide detailed lifecycle tracking for AI assistant interactions:
AIAssistantBaseEvent– Serves as the base type for all AI assistant-related events.AIAssistantRunStartedEvent– Triggered when an AI assistant run begins.AIAssistantRunFinishedEvent– Triggered when an AI assistant run completes.AIAssistantMessageStartedEvent– Triggered when an AI assistant begins sending a message.AIAssistantMessageEndedEvent– Triggered when an AI assistant finishes sending a message.AIAssistantContentReceivedEvent– Triggered when content is received from the AI assistant.AIAssistantToolStartedEvent– Triggered when the AI assistant starts executing a tool.AIAssistantToolEndedEvent– Triggered when the AI assistant completes a tool execution.AIAssistantToolArgumentEvent– Triggered when arguments are passed to an AI tool.AIAssistantToolResultEvent– Triggered when results are returned from an AI tool.
-
Introduced AIAssistantListener for subscribing to and handling AI assistant events.
addAIAssistantListener– Registers a listener for AI assistant events.removeAIAssistantListener– Unregisters an AI assistant listener.onAIAssistantEventReceived- Handles incoming AI assistant events.
-
Introduced new methods in MessageListener for subscribing to and handling new AI assistant messages.
onAIAssistantMessageReceived– Handles incoming AI assistant message.onAIToolArgumentsReceived– Handles incoming AI tool arguments.onAIToolResultReceived– Handles incoming AI tool result.
-
Added Messages & Data Classes for structured handling of AI tool call, argument, result and message:
AIToolResultMessage– Represents a message containing the result of a tool execution.AIToolResultMessageData– Contains structured data for a tool result message.AIToolCall– Contains structured data for a specific AI tool call.AIToolCallFunction– Contains structured data for a specific AI tool call function.AIToolArgumentMessage– Represents a message containing tool arguments.AIToolArgumentMessageData– Contains structured data for a tool argument message.AIAssistantMessage– Represents a message sent by the AI assistant.AIAssistantMessageData– Contains structured data for an AI assistant message.
Enhancements
- None
Fixes
- None
v4.0.14
New
- None
Enhancements
- Added Dependency identification for Chat Builder.
Fixes
- None
v4.0.13
New
- Added a new method
setAttachmentTypesinMessagesRequestBuilder, enabling users to filter messages by attachment type (image, file, video, audio). - Introduced an
AttachmentTypeenum to support the new attachment filtering feature.
Enhancements
- None
Fixes
- Resolved a crash that occurred when
nullwas passed as the last message parameter while creating a conversation object usingnew CometChat.Conversation(). - Fixed an issue where special characters such as
#and@in tags or search keywords were not being sent to the API. - Addressed a problem where string values like
"0","null","undefined", and"false"passed as search keywords were ignored by the SDK. - Removed unnecessary references to
sendFriendRequests,acceptFriendRequest, andrejectFriendRequestto streamline the SDK.
v4.0.12
New
- Introduced Conversations & Advanced Search to enhance message and conversation filtering capabilities.
- Added new filters to
MessagesRequestBuilder:hasAttachments()– Retrieve messages that contain file attachments.hasReactions()– Retrieve messages that include user reactions.hasMentions()– Retrieve messages where users are mentioned.hasLinks()– Retrieve messages that contain hyperlinks.setMentionedUIDs(string[])– Retrieve messages mentioning specific user IDs.
- Added new filters to
ConversationsRequestBuilder:setSearchKeyword(string)– Search conversations (user or group) by name keyword.setUnread(boolean)– Retrieve only unread conversations.
Enhancements
- None
Fixes
- None
v4.0.11
New
- Added a new constant named
PresenceConstantsto replace the deprecatedPresenceConstatnts.
Enhancements
- None
Fixes
- Fixed an issue where setting roles in the
subscribePresenceForRoles()method ofAppSettingsBuildercaused presence functionality to stop working entirely. Now, presence updates are received only for the specified roles, as intended. - Fixed an issue with
MessageReceiptnot being exposed in theCometChatclass.
Deprecation
Deprecated PresenceConstatnts in favor of PresenceConstants.
v4.0.10
New
- None
Enhancements
- None
Fixes
- Fixed an issue where the timer for marking a call as unanswered would continue running even after the call was accepted, causing problems when the initiator attempted to end the call.