Class Messenger

Client class used to control messaging functions. Can't be instantiatied directly (singleton), please use VoxImplant.getMessenger to get the class instance.

Index

Methods

addEventListener

  • Register handler for specified event

    Parameters

    Returns void

createConversation

  • createConversation(participants: Array<ConversationParticipant>, title?: string, distinct?: boolean, enablePublicJoin?: boolean, customData?: any): void
  • Create new conversation

    Parameters

    • participants: Array<ConversationParticipant>
    • Optional title: string
    • Optional distinct: boolean
    • Optional enablePublicJoin: boolean
    • Optional customData: any

    Returns void

editUser

  • editUser(custom_data?: Object, private_custom_data?: Object): void
  • Edit current user information

    Parameters

    • Optional custom_data: Object

      public part of custom data

    • Optional private_custom_data: Object

      private part of custom data

    Returns void

getConversation

  • getConversation(uuid: string): void
  • Get exist conversation

    Parameters

    • uuid: string

    Returns void

getMe

  • getMe(): string
  • Get short identifier of current user

    Returns string

    current user short identifier

getUser

  • getUser(user_id: string): void
  • Get user information by short identifier

    Parameters

    • user_id: string

      short identifier (without .voximplant.com)

    Returns void

joinConversation

  • joinConversation(uuid: string): void
  • Join current user to specified conversation

    Parameters

    • uuid: string

      Universally Unique Identifier of conversation

    Returns void

leaveConversation

  • leaveConversation(uuid: string): void
  • Leave current user from specified conversation

    Parameters

    • uuid: string

      Universally Unique Identifier of conversation

    Returns void

off

  • Remove handler for specified event (shortcut for removeEventListener)

    Parameters

    Returns void

on

  • Register handler for specified event (shortcut for addEventListener)

    Parameters

    Returns void

removeConversation

  • removeConversation(uuid: string): void
  • Remove specified conversation

    Parameters

    • uuid: string

      Universally Unique Identifier of conversation

    Returns void

removeEventListener

  • Remove handler for specified event

    Parameters

    Returns void