@cometchat/chat-uikit-react
Version:
Ready-to-use Chat UI Components for React(Javascript/Web)
45 lines (44 loc) • 1.25 kB
TypeScript
/**
* Utility class for handling message receipt statuses.
* It is used in CometChatConversations and CometChatMessageList components.
*/
export declare class MessageReceiptUtils {
/**
* Gets the receipt status icon for a given message.
*
* Determines the receipt status based on the message's properties and returns
* the corresponding receipt icon.
*
* @param {CometChat.BaseMessage} messageObject - The message object for which to get the receipt status.
* @returns {receipts} - The receipt status icon.
*/
static getReceiptStatus: (messageObject: CometChat.BaseMessage) => receipts;
}
/**
* Enum representing different receipt statuses for a message.
*
* @readonly
* @enum {number}
*/
export declare enum receipts {
/**
* Status indicating that the message is waiting to be processed.
*/
wait = 0,
/**
* Status indicating that the message has been sent.
*/
sent = 1,
/**
* Status indicating that the message has been delivered.
*/
delivered = 2,
/**
* Status indicating that the message has been read.
*/
read = 3,
/**
* Status indicating that an error occurred with the message.
*/
error = 4
}