Rate this page:

MessengerEventType

Constants

isRead

Copy URL

Triggered for all clients in the conversation as the result of Conversation.markAsRead or similar methods from other Voximplant SDKs and Messaging API.

The listener is called with IsReadMessageEvent and a payload.

Parameters

  • Action that triggered this event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • message:

    Message

    Message instance with message information.

  • sequence:

    number

    Sequence number for the event.

  • timestamp:

    number

    UNIX timestamp (seconds) when the message event has been triggered.

onCreateConversation

Copy URL

Triggered if a conversation is created via Messenger.createConversation or similar methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation.

The listener is called with OnCreateConversationEvent and a payload.

Parameters

  • Action that triggered this event.

  • conversation:

    Conversation

    Conversation instance with the conversation details.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • sequence:

    number

    Sequence number of the event.

  • timestamp:

    number

    UNIX timestamp (seconds) when the event has been dispatched by the cloud.

onEditConversation

Copy URL

Triggered if the conversation properties have been modified as the result of:

Triggered only for participants that belong to the conversation.

The listener is called with OnEditConversationEvent and a payload.

Parameters

  • Action that triggered this event.

  • conversation:

    Conversation

    Conversation instance with the conversation details.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • sequence:

    number

    Sequence number of the event.

  • timestamp:

    number

    UNIX timestamp (seconds) when the event has been dispatched by the cloud.

onEditMessage

Copy URL

Triggered if a message has been edited via Message.edit or similar methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation with the changed message.

The listener is called with OnEditMessageEvent and a payload.

Parameters

  • Action that triggered this event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • message:

    Message

    Message instance with message information.

  • sequence:

    number

    Sequence number for the event.

  • timestamp:

    number

    UNIX timestamp (seconds) when the message event has been triggered.

onEditUser

Copy URL

Triggered as the result of Messenger.editUser or similar methods from other Voximplant SDKs and Messaging API.

Triggered only for the subscribers of the changed user.

Use the Messenger.subscribe API to subscribe for user's changes.

The listener is called with OnEditUserEvent and a payload.

Parameters

  • Action that triggered this event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • user:

    User

    User instance with user information.

onRemoveConversation

Copy URL

Triggered if a conversation has been removed.

Note that removal is possible only via the Voximplant Messaging API.

Triggered only for participants that belong to the conversation.

The listener is called with OnRemoveConversationEvent and a payload.

Parameters

  • Action that triggered this event.

  • conversation:

    Conversation

    Conversation instance with the conversation details.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • sequence:

    number

    Sequence number of the event.

  • timestamp:

    number

    UNIX timestamp (seconds) when the event has been dispatched by the cloud.

onRemoveMessage

Copy URL

Triggered if a message has been removed from a conversation via Message.remove or similar methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation with the deleted message.

The listener is called with OnRemoveMessageEvent and a payload.

Parameters

  • Action that triggered this event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • message:

    Message

    Message instance with message information.

  • sequence:

    number

    Sequence number for the event.

  • timestamp:

    number

    UNIX timestamp (seconds) when the message event has been triggered.

onSendMessage

Copy URL

Triggered if a new message has been sent to a conversation via Conversation.sendMessage or similar methods from other Voximplant SDKs and Messaging API.

Triggered only for participants that belong to the conversation.

The listener is called with OnSendMessageEvent and a payload.

Parameters

  • Action that triggered this event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • message:

    Message

    Message instance with message information.

  • sequence:

    number

    Sequence number for the event.

  • timestamp:

    number

    UNIX timestamp (seconds) when the message event has been triggered.

onSetStatus

Copy URL

Triggered if a user status has been changed via Messenger.setStatus or similar methods from other Voximplant SDKs and Messaging API.

Triggered only for the subscribers of the changed user.

Use the Messenger.subscribe API to subscribe for user's changes.

The listener is called with OnSetStatusEvent and a payload.

Parameters

  • Action that triggered this event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • isOnline:

    boolean

    User status.

onSubscribe

Copy URL

Triggered as the result of Messenger.subscribe or similar methods from other Voximplant SDKs and Messaging API.

Triggered on all logged in clients of the current user.

The listener is called with OnSubscribeEvent and a payload.

Parameters

  • Action that triggered this event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • users:

    number[]

    Array of the IM user identifiers of the current (un)subscription.

onTyping

Copy URL

Triggered when a user is typing in a conversation.

Typing information is received via Conversation.typing or similar methods from other Voximplant SDKs and the Messaging API.

Event triggers only for participants in the conversation where someone is typing in conversation.

The listener is called with OnTypingMessageEvent and a payload.

Parameters

  • Action that triggered this event.

  • conversationUuid:

    string

    Conversation UUID associated with the event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • sequence:

    null | number

    Sequence number of the event that has been marked as read by the user who initiated this event.

    Only available for MessengerEventType.isRead.

onUnsubscribe

Copy URL

Triggered as the result of Messenger.unsubscribe or similar methods from other Voximplant SDKs and Messaging API.

Triggered on all logged in clients of the current user.

The listener is called with OnUnsubscribeEvent and a payload.

Parameters

  • Action that triggered this event.

  • imUserId:

    number

    IM ID of the user that initiated the event.

  • users:

    number[]

    Array of the IM user identifiers of the current (un)subscription.