Skip to main content
This page documents the auxiliary classes used across all CometChat SDKs. These objects are returned by listener callbacks and specific SDK methods. All properties are accessed via getter methods.

MessageReceipt

MessageReceipt represents a delivery or read receipt for a message. It is received via the onMessagesDelivered and onMessagesRead listener callbacks.

Properties

PropertyGetterReturn TypeDescription
messageIdgetMessageId()stringID of the message this receipt is for
sendergetSender()UserThe user who triggered the receipt
receivergetReceiver()stringUID or GUID of the receiver
receiverTypegetReceiverType()stringReceiver type ("user" or "group")
receiptTypegetReceiptType()stringType of receipt ("read", "delivery", "readByAll", or "deliveredToAll")
timestampgetTimestamp()stringTimestamp of the receipt
readAtgetReadAt()numberTimestamp when the message was read (epoch seconds)
deliveredAtgetDeliveredAt()numberTimestamp when the message was delivered (epoch seconds)

ReactionCount

ReactionCount represents the count of a specific reaction on a message. It is available via getReactions() on a BaseMessage object.

Properties

PropertyGetterReturn TypeDescription
reactiongetReaction()stringThe reaction emoji (e.g., "😀", "👍")
countgetCount()numberNumber of users who reacted with this reaction
reactedByMegetReactedByMe()booleanWhether the logged-in user reacted with this reaction

ReactionEvent

ReactionEvent represents a real-time reaction event. It is received via the onMessageReactionAdded and onMessageReactionRemoved listener callbacks.

Properties

PropertyGetterReturn TypeDescription
reactiongetReaction()ReactionThe reaction details object
receiverIdgetReceiverId()stringUID or GUID of the receiver
receiverTypegetReceiverType()stringReceiver type ("user" or "group")
conversationIdgetConversationId()stringID of the conversation
parentMessageIdgetParentMessageId()stringID of the parent message (if the reacted message is in a thread)

TypingIndicator

TypingIndicator represents a typing event. It is received via the onTypingStarted and onTypingEnded listener callbacks.

Properties

PropertyGetterReturn TypeDescription
receiverIdgetReceiverId()stringUID or GUID of the receiver
receiverTypegetReceiverType()stringReceiver type ("user" or "group")
sendergetSender()UserThe user who is typing
metadatagetMetadata()ObjectCustom metadata attached to the typing indicator

TransientMessage

TransientMessage represents a transient (non-persistent) message. It is received via the onTransientMessageReceived listener callback. Transient messages are not stored on the server.

Properties

PropertyGetterReturn TypeDescription
receiverIdgetReceiverId()stringUID or GUID of the receiver
receiverTypegetReceiverType()stringReceiver type ("user" or "group")
sendergetSender()UserThe user who sent the transient message
datagetData()anyCustom data payload of the transient message

Attachment

Attachment represents a file attachment on a MediaMessage. It is available via getAttachment() or getAttachments() on a MediaMessage object.

Properties

PropertyGetterReturn TypeDescription
namegetName()stringName of the file
extensiongetExtension()stringFile extension (e.g., "png", "pdf")
mimeTypegetMimeType()stringMIME type of the file (e.g., "image/png")
sizegetSize()numberSize of the file in bytes
urlgetUrl()stringURL to download the file