VIMessage
Interface that represents message within a conversation.
Props
conversation
String
 conversationUUID of the conversation this message belongs to.
Message can belong to the one conversation only.
Returns
type:
String
payload
List<Map<String, dynamic>>
 payloadList of payload objects associated with the message.
Returns
type:
List<Map<String, dynamic>>
sequence
int
 sequenceMessage sequence number in the conversation.
Returns
type:
int
text
String
 textText of this message.
Returns
type:
String
uuid
String
 uuidUniversally unique identifier (UUID) of the message.
Returns
type:
String
Methods
remove
Future<VIMessageEvent>
 remove()Removes the message from the conversation.
The participant that calls this method should have:
- the VIConversationParticipant.canRemoveMessages permission to remove its own messages
 - the VIConversationParticipant.canRemoveAllMessages permission to remove other participants' messages
 
Returns
type:
Future<VIMessageEvent>
update
Future<VIMessageEvent>
 update({String?
 text, List<Map<String, Object>>?
 payload})Sends text and payload changes to the cloud.
The participant that calls this method should have:
- the VIConversationParticipant.canEditMessages permission to update its own messages
 - the VIConversationParticipant.canEditAllMessages permission to update other participants' messages
 
To be informed about the message updating while being offline, participants can subscribe to the onEditMessage messenger push notification.
Parameters
text:
String?
OptionalNew text of this message, maximum 5000 characters. If null, message text is not updated.
payload:
List<Map<String, Object>>?
OptionalNew payload of this message. If null, message payload is not updated.
Returns
type:
Future<VIMessageEvent>