MessengerEventTypes
Types of messenger events.
Constants
CreateConversation
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
conversation:
Object with conversation information.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
sequence:
number
Sequence number of this event.
timestamp:
number
UNIX timestamp (seconds) that specifies the time the conversation event has been triggered.
EditConversation
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
conversation:
Object with conversation information.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
sequence:
number
Sequence number of this event.
timestamp:
number
UNIX timestamp (seconds) that specifies the time the conversation event has been triggered.
EditMessage
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
message:
Message object.
sequence:
number
Sequence number for this event.
timestamp:
number
UNIX timestamp (seconds) that specifies the time the message event has been triggered.
EditUser
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
user:
Object with user info.
Error
Type of the event the promises of the Voximplant React Native Messaging methods are rejected with. Promises reject to an event with the following parameters as an argument. Subscription to this event via Messenger.on never causes the execution of the specified handler function.
Parameters
action:
code:
number
description:
string
eventType:
GetConversation
Type of the event Messenger.getConversation and Messenger.getConversations methods are resolved with. These methods resolve to an event with the following parameters as an argument. Subscription to this event via Messenger.on never causes the execution of the specified handler function.
Parameters
action:
Action that triggered this event.
conversation:
Object with conversation information.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
sequence:
number
Sequence number of this event.
timestamp:
number
UNIX timestamp (seconds) that specifies the time the conversation event has been triggered.
GetPublicConversations
Type of the event Messenger.getPublicConversations method are resolved with. This method resolves to an event with the following parameters as an argument. Subscription to this event via Messenger.on never causes the execution of the specified handler function.
Parameters
action:
conversationList:
string[]
eventType:
imUserId:
number
GetSubscriptions
Type of the event Messenger.getSubscriptions method are resolved with. This method resolves to an event with the following parameters as an argument. Subscription to this event via Messenger.on never causes the execution of the specified handler function.
Parameters
action:
Action that triggered this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
users:
number[]
Array of the IM user identifiers of the current (un)subscription.
GetUser
Type of the event Messenger.getUserByIMId, Messenger.getUserByName, Messenger.getUsersByIMId and Messenger.getUsersByName methods are resolved with. These methods resolve to an event with the following parameters as an argument. Subscription to this event via Messenger.on never causes the execution of the specified handler function.
Parameters
action:
Action that triggered this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
user:
Object with user info.
Read
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
conversationUUID:
string
The conversation UUID associated with this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
sequence:
number
The sequence number of the event that has been marked as read by the user initiated this event.
RemoveConversation
Triggered when a conversation has been removed. Note that removing is possible via Voximplant Messaging API only. Triggered only for participants that belong to the conversation. Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
conversation:
Object with conversation information.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
sequence:
number
Sequence number of this event.
timestamp:
number
UNIX timestamp (seconds) that specifies the time the conversation event has been triggered.
RemoveMessage
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
message:
Message object.
sequence:
number
Sequence number for this event.
timestamp:
number
UNIX timestamp (seconds) that specifies the time the message event has been triggered.
RetransmitEvents
Type of the event Conversation.retransmitEvents, Conversation.retransmitEventsFrom and Conversation.retransmitEventsTo methods are resolved with. These methods resolve to an event with the following parameters as an argument. Subscription to this event via Messenger.on never causes the execution of the specified handler function.
Parameters
action:
eventType:
events:
object[]
from:
number
imUserId:
number
to:
number
SendMessage
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
message:
Message object.
sequence:
number
Sequence number for this event.
timestamp:
number
UNIX timestamp (seconds) that specifies the time the message event has been triggered.
SetStatus
Handler function receives the event with the following parameters as an argument.
Parameters
action:
eventType:
imUserId:
number
online:
boolean
Subscribe
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
users:
number[]
Array of the IM user identifiers of the current (un)subscription.
Typing
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
conversationUUID:
string
The conversation UUID associated with this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
Unsubscribe
Handler function receives the event with the following parameters as an argument.
Parameters
action:
Action that triggered this event.
eventType:
Messenger event type.
imUserId:
number
The IM id for the user that initiated the event.
users:
number[]
Array of the IM user identifiers of the current (un)subscription.