chat module

Describes information needed to start a chat

Interfaces

OpenGroupChatRequest

Used when starting a chat with more than one person

See OpenSingleChatRequest for use in a chat with only one person

OpenSingleChatRequest

Used when starting a chat with one person

See OpenGroupChatRequest for use when a chat with more than one person

Functions

isSupported()

Checks if the chat capability is supported by the host

openChat(OpenSingleChatRequest)

Allows the user to open a chat with a single user and allows for the user to specify the message they wish to send.

openGroupChat(OpenGroupChatRequest)

Allows the user to create a chat with multiple users (2+) and allows for the user to specify a message and name the topic of the conversation. If only 1 user is provided into users array default back to origin openChat.

Function Details

isSupported()

Checks if the chat capability is supported by the host

function isSupported(): boolean

Returns

boolean

boolean to represent whether the chat capability is supported

openChat(OpenSingleChatRequest)

Allows the user to open a chat with a single user and allows for the user to specify the message they wish to send.

function openChat(openChatRequest: OpenSingleChatRequest): Promise<void>

Parameters

openChatRequest
OpenSingleChatRequest

Returns

Promise<void>

Promise resolved upon completion

openGroupChat(OpenGroupChatRequest)

Allows the user to create a chat with multiple users (2+) and allows for the user to specify a message and name the topic of the conversation. If only 1 user is provided into users array default back to origin openChat.

function openGroupChat(openChatRequest: OpenGroupChatRequest): Promise<void>

Parameters

openChatRequest
OpenGroupChatRequest

Returns

Promise<void>

Promise resolved upon completion