MessengerEventTypes
Types of messenger events.
Constants
CreateConversation
The handler function receives an 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 was provoked.
EditConversation
The handler function receives an 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 was provoked.
EditMessage
The handler function receives an 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
The sequence number for this event.
timestamp:
number
The UNIX timestamp (seconds) that specifies the time the message event was provoked.
EditUser
The handler function receives an 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 will never cause 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 will never cause 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 was provoked.
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 will never cause 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 will never cause 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 will never cause 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
The handler function receives an 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 was marked as read by the user initiated this event.
RemoveConversation
Event is triggered when a conversation was removed. Note that removing is possible via Voximplant Messaging API only. Triggered only for participants that belong to the conversation. The handler function receives an 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 was provoked.
RemoveMessage
The handler function receives an 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
The sequence number for this event.
timestamp:
number
The UNIX timestamp (seconds) that specifies the time the message event was provoked.
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 will never cause the execution of the specified handler function.
Parameters
action:
eventType:
events:
object[]
from:
number
imUserId:
number
to:
number
SendMessage
The handler function receives an 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
The sequence number for this event.
timestamp:
number
The UNIX timestamp (seconds) that specifies the time the message event was provoked.
SetStatus
The handler function receives an event with the following parameters as an argument.
Parameters
action:
eventType:
imUserId:
number
online:
boolean
Subscribe
The handler function receives an 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
The handler function receives an 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
The handler function receives an 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.