Skip to content

v4.1.12

Choose a tag to compare

@aanshisingh-cometchat aanshisingh-cometchat released this 06 Jul 18:29
· 3 commits to v4 since this release
3a43730

v4.1.12

New

  • Added support for receiving card messages, a new card message category for structured content that the application renders. Register an onCardMessageReceived callback on a MessageListener to handle them, then read the payload through the new CometChat.CardMessage class using getCard(), getText(), and getFallbackText(). 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 onAIAssistantEventReceived listener as card_start, card, and card_end events. The new CometChat.AIAssistantCardStartedEvent, CometChat.AIAssistantCardReceivedEvent, and CometChat.AIAssistantCardEndedEvent classes expose the card as it streams, with accessors including getStreamMessageId(), getCardId(), getExecutionText(), and getCard().

Enhancements

  • Added a getElements() method to AIAssistantMessage that returns an ordered list of CometChat.AIAssistantElement content blocks, enabling inline rendering of mixed assistant replies such as interleaved text and cards. Each element exposes getType() and getData(), and messages without elements return an empty array, so existing getText()-based handling continues to work unchanged.

Fixes

  • None