ZIMMessage class

Base class of message object

Description: Identifies the basic parameters of a message. Caution: Some of the parameters, such as Message ID, only have values ​​during the callback. Developers do not need to assign values ​​to these parameters when they actively create this object for sending messages.

Implementers

Constructors

ZIMMessage({ZIMMessageType type = ZIMMessageType.unknown, dynamic messageID = 0, dynamic localMessageID = 0, int messageSeq = 0, String senderUserID = '', String conversationID = '', ZIMConversationType conversationType = ZIMConversationType.unknown, ZIMMessageDirection direction = ZIMMessageDirection.send, ZIMMessageSentStatus sentStatus = ZIMMessageSentStatus.sending, int timestamp = 0, int orderKey = 0, bool isUserInserted = false, ZIMMessageReceiptStatus receiptStatus = ZIMMessageReceiptStatus.none, String extendedData = '', String localExtendedData = '', List<ZIMMessageReaction>? reactions, bool isBroadcastMessage = false, List<String>? mentionedUserIDs, bool isMentionAll = false, ZIMMessageRepliedInfo? repliedInfo, int rootRepliedCount = 0, bool isServerMessage = false, String cbInnerID = '', String editorUserID = '', int editedTime = 0, bool isGroupTargetedMessage = false, String pinnedUserID = '', int pinnedTime = 0})
ZIMMessage.fromMap(Map map)

Properties

cbInnerID String
The internal callback ID of the message.
getter/setter pair
conversationID String
Description: Conversation ID. Ids of the same conversation type are unique.
getter/setter pair
conversationType ZIMConversationType
Description: The type of conversation to which the message belongs.
getter/setter pair
direction ZIMMessageDirection
Description: Used to describe whether a message is sent or received.
getter/setter pair
editedTime int
Description: The time of message editing.
getter/setter pair
editorUserID String
Description: The userID of the message editor.
getter/setter pair
extendedData String
Description: message extension field Use cases: You can add extended fields to the message and send it to the peer Required: no Caution:the length is 1k, you can contact technical support for configuration Available since: 2.6.0 or higher
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isBroadcastMessage bool
Description: Whether the message is pushed by all employees. Required: Internal assignment.
getter/setter pair
isGroupTargetedMessage bool
Indicates whether the message is a group-targeted message.
getter/setter pair
isMentionAll bool
Description: Whether to mention everyone. It can be presented as "@Everyone". Use cases: For example, it can be used in groups or rooms. Required: No. Default value: false. Recommended value: Set to true if you need to mention everyone. Caution: This value does not add the "@Everyone" to the message text. Developers need to implement it themselves. Available since: 2.14.0 or above
getter/setter pair
isServerMessage bool
Whether the message was sent by the server.
getter/setter pair
isUserInserted bool
Detail description: Describes whether the message is a message inserted by the developer through insertMessageToLocalDB.Default: false.
getter/setter pair
localExtendedData String
Description: The expandable message field visible only on this end can store additional information locally, Through updateMessageLocalExtendedData change and currently has a length limit of 128K. If you have special requirements, please contact ZEGO technical support for configuration.
getter/setter pair
localMessageID ↔ dynamic
Description: SDK locally generated MessageID, developers do not need to pay attention to.
getter/setter pair
mentionedUserIDs List<String>
Description: Whether to mention everyone. It can be presented as "@User". Use cases: For example, it can be used in sending messages. Required: No. Caution: This value does not add the "@User" to the message text. Developers need to implement it themselves. Available since: 2.14.0 or above
getter/setter pair
messageID ↔ dynamic
Description: The unique ID that identifies this message.Use cases: Can be used to index other messages.Caution: When the developer actively creates a message, there is no need to modify this parameter.This parameter only has a value during callback.
getter/setter pair
messageSeq int
Description: The sequence number of the message.
getter/setter pair
orderKey int
Description:The larger the orderKey, the newer the message, and can be used for ordering messages.
getter/setter pair
pinnedTime int
Description: The time of message pinning.
getter/setter pair
pinnedUserID String
Description: The userID of the message pinner.
getter/setter pair
reactions List<ZIMMessageReaction>
Description: Message statement list, which can carry data strongly related to users such as emoji expressions and voting information.
getter/setter pair
receiptStatus ZIMMessageReceiptStatus
Detailed Description: Describe the receipt status of the messageBusiness scenario: used to determine the status of the current message in the receipt message
getter/setter pair
repliedInfo ZIMMessageRepliedInfo?
Description: Message reply information.
getter/setter pair
rootRepliedCount int
Description: Root replied count.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
senderUserID String
Description:Displays the userID of the sender of this message.
getter/setter pair
sentStatus ZIMMessageSentStatus
Description: Describes the sending status of a message.
getter/setter pair
timestamp int
Description: Identifies the sending time of a messageUse cases: Used to present the sending time of a message, and can be used for message sorting.Caution: This is a standard UNIX timestamp, in milliseconds.
getter/setter pair
type ZIMMessageType
Identifies the type of this message.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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