Message
Methods
remove
fun remove(): Promise<MessengerEventTypes.RemoveMessage,MessengerEventTypes.Error>
Removes the message from the conversation.The participant that calls this method should have:
- the ConversationParticipant.canRemoveMessagespermission to remove its own messages
- the [ConversationParticipant#canRemoveAllMessages] permission to remove other participants' messages
Other parties of the conversation (online participants and logged in clients) can be informed about the message removing via the MessengerEventTypes.RemoveMessage event.
Returns
type:
Promise<MessengerEventTypes.RemoveMessage,MessengerEventTypes.Error>
update
fun update(text: string
, payload: {[key: string]: any}[]
): Promise<MessengerEventTypes.EditMessage,MessengerEventTypes.Error>
Sends text and payload changes to the cloud.The participant that calls this method should have:
- the ConversationParticipant.canEditMessages permission to update its own messages
- the ConversationParticipant.canEditAllMessages permission to update other participants' messages
Other parties of the conversation (online participants and logged in clients) can be informed about the message updating via the MessengerEventTypes.EditMessage event.
To be informed about the message updating while being offline, participants can subscribe to the MessengerNotification.EditMessage messenger push notification.
Parameters
text:
string
New text of this message, maximum 5000 characters. If null, message text is not updated.
payload:
{[key: string]: any}[]
New payload of this message. If null, message payload is not updated.
Returns
type:
Promise<MessengerEventTypes.EditMessage,MessengerEventTypes.Error>
Props
conversation
var conversation: Conversation UUID this message belongs to. The message can belong to the one conversation only.
payload
var payload: Array of payload objects associated with the message.
sequence
var sequence: Message sequence number in the conversation.
text
var text: Text of this message.
uuid
var uuid: Universally unique identifier (UUID) of the message.