MessageReceipt class

Represents a message receipt within the chat.

Android Reference: com.cometchat.chat.models.MessageReceipt

This class includes properties that encapsulate details of a message receipt, including the messageId, sender, receiverType, receiverId, timestamp, receiptType, deliveredAt time, readAt time, and messageSender.

Constructors

MessageReceipt({int? messageId, required User sender, String? receiverType, String? receiverId, DateTime? timestamp, String? receiptType, DateTime? deliveredAt, DateTime? readAt, String? messageSender})

Properties

deliveredAt ↔ DateTime?
Delivery timestamp of the message.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
messageId → int?
ID of the message this receipt is for.
final
messageSender → String?
UID of the original message sender.
final
readAt ↔ DateTime?
Read timestamp of the message.
getter/setter pair
receiptType → String?
Type of receipt: "delivered", "read", "deliveredToAll", "readByAll".
final
receiverId → String?
ID of the receiver (user or group).
final
receiverType → String?
Type of receiver ("user" or "group").
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sender → User
The user who sent the receipt (who read/received the message).
final
timestamp → DateTime?
Timestamp of the receipt event.
final

Methods

copyWith({int? messageId, User? sender, String? receiverType, String? receiverId, DateTime? timestamp, String? receiptType, DateTime? deliveredAt, DateTime? readAt, String? messageSender}) → MessageReceipt
Creates a copy of this MessageReceipt with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Generates a map representing the MessageReceipt.
toString() → String
Generates a string representation of the MessageReceipt.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

receiptTypeDelivered → const String
Receipt type constants matching Android SDK.
receiptTypeDeliveredToAll → const String
receiptTypeRead → const String
receiptTypeReadByAll → const String