Interface ChatMultiDeviceEventListener

The multi-device event listener.

The listener listens for the actions of the current user on other devices, including contact events, group events, thread events, and conversation events.

interface ChatMultiDeviceEventListener {
    onContactEvent?(event?: ChatMultiDeviceEvent, target?: string, ext?: string): void;
    onConversationEvent?(event?: ChatMultiDeviceEvent, convId?: string, convType?: ChatConversationType): void;
    onGroupEvent?(event?: ChatMultiDeviceEvent, target?: string, usernames?: string[]): void;
    onMessageRemoved?(convId?: string, deviceId?: string): void;
    onThreadEvent?(event?: ChatMultiDeviceEvent, target?: string, usernames?: string[]): void;
}

Methods

  • Occurs when a contact event occurs.

    Parameters

    • Optionalevent: ChatMultiDeviceEvent

      The event type.

    • Optionaltarget: string

      The user ID.

    • Optionalext: string

      The extension of user information.

    Returns void

  • Occurs when a conversation event occurs.

    Parameters

    Returns void

  • Occurs when a group event occurs.

    Parameters

    • Optionalevent: ChatMultiDeviceEvent

      The event type.

    • Optionaltarget: string

      The group ID.

    • Optionalusernames: string[]

      The array of user IDs.

    Returns void

  • Callback to other devices after conversation deleted message from server after enabling multiple devices.

    Parameters

    • OptionalconvId: string

      The conversation ID.

    • OptionaldeviceId: string

      The device ID.

    Returns void

  • Occurs when a thread event occurs.

    Parameters

    • Optionalevent: ChatMultiDeviceEvent

      The event type.

    • Optionaltarget: string

      The group ID.

    • Optionalusernames: string[]

      The array of user IDs.

    Returns void