v4.1.12
·
3 commits
to v4
since this release
v4.1.12
New
- Added support for receiving card messages, a new
cardmessage category for structured content that the application renders. Register anonCardMessageReceivedcallback on aMessageListenerto handle them, then read the payload through the newCometChat.CardMessageclass usinggetCard(),getText(), andgetFallbackText(). The SDK returns the raw card JSON without interpreting it, leaving presentation to the application. - Added real-time card streaming for AI Assistant responses, delivered through the existing
onAIAssistantEventReceivedlistener ascard_start,card, andcard_endevents. The newCometChat.AIAssistantCardStartedEvent,CometChat.AIAssistantCardReceivedEvent, andCometChat.AIAssistantCardEndedEventclasses expose the card as it streams, with accessors includinggetStreamMessageId(),getCardId(),getExecutionText(), andgetCard().
Enhancements
- Added a
getElements()method toAIAssistantMessagethat returns an ordered list ofCometChat.AIAssistantElementcontent blocks, enabling inline rendering of mixed assistant replies such as interleaved text and cards. Each element exposesgetType()andgetData(), and messages without elements return an empty array, so existinggetText()-based handling continues to work unchanged.
Fixes
- None