Rate this page:

MessengerEventTypes

Types of messenger events.

Constants

CreateConversation

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • conversation:

    Conversation

    Object with conversation information.

  • 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

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • conversation:

    Conversation

    Object with conversation information.

  • 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

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • Messenger event type.

  • imUserId:

    number

    The IM id for the user that initiated the event.

  • message:

    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

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • Messenger event type.

  • imUserId:

    number

    The IM id for the user that initiated the event.

  • user:

    User

    Object with user info.

Error

Copy URL

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

GetConversation

Copy URL

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 that triggered this event.

  • conversation:

    Conversation

    Object with conversation information.

  • 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

Copy URL

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

GetSubscriptions

Copy URL

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 that triggered this event.

  • 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

Copy URL

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 that triggered this event.

  • Messenger event type.

  • imUserId:

    number

    The IM id for the user that initiated the event.

  • user:

    User

    Object with user info.

Read

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • conversationUUID:

    string

    The conversation UUID associated with this event.

  • 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

Copy URL

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 that triggered this event.

  • conversation:

    Conversation

    Object with conversation information.

  • 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

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • Messenger event type.

  • imUserId:

    number

    The IM id for the user that initiated the event.

  • message:

    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

Copy URL

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

SendMessage

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • Messenger event type.

  • imUserId:

    number

    The IM id for the user that initiated the event.

  • message:

    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

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

Subscribe

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • 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

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • conversationUUID:

    string

    The conversation UUID associated with this event.

  • Messenger event type.

  • imUserId:

    number

    The IM id for the user that initiated the event.

Unsubscribe

Copy URL

Handler function receives the event with the following parameters as an argument.

Parameters

  • Action that triggered this event.

  • 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.