Rate this page:

MessengerEventTypes

Types of messenger events.

Constants

CreateConversation

Copy URL

The handler function receives an 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 was provoked.

EditConversation

Copy URL

The handler function receives an 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 was provoked.

EditMessage

Copy URL

The handler function receives an 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

    The sequence number for this event.

  • timestamp:

    number

    The UNIX timestamp (seconds) that specifies the time the message event was provoked.

EditUser

Copy URL

The handler function receives an 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 will never cause 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 will never cause 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 was provoked.

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 will never cause 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 will never cause 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 will never cause 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

The handler function receives an 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 was marked as read by the user initiated this event.

RemoveConversation

Copy URL

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 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 was provoked.

RemoveMessage

Copy URL

The handler function receives an 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

    The sequence number for this event.

  • timestamp:

    number

    The UNIX timestamp (seconds) that specifies the time the message event was provoked.

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 will never cause the execution of the specified handler function.

Parameters

SendMessage

Copy URL

The handler function receives an 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

    The sequence number for this event.

  • timestamp:

    number

    The UNIX timestamp (seconds) that specifies the time the message event was provoked.

SetStatus

Copy URL

The handler function receives an event with the following parameters as an argument.

Parameters

Subscribe

Copy URL

The handler function receives an 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

The handler function receives an 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

The handler function receives an 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.