Skip to main content
  • create(addresses, options) creates a direct or group chat, optionally with an opening message.
  • get(chat) fetches one chat by guid.
  • count(options) counts visible chats, optionally including archived chats.
  • hasBackground(chat) checks whether a chat has a custom background.
  • setBackground(chat, data) replaces a chat background image.
  • removeBackground(chat) clears a chat background image.
  • markRead(chat) marks every unread message in the chat as read.
  • shareContactInfo(chat) sends the local account’s contact card.
  • setTyping(chat, isTyping) starts or stops the transient typing indicator.

Methods

count()

Parameters

{ includeArchived: boolean }

Returns

Promise<number>

create()

Parameters

string[]
required

Returns

CreateChatResult

get()

Parameters

string
required

Returns

Chat

hasBackground()

Parameters

string
required

Returns

Promise<boolean>

markRead()

Parameters

string
required

Returns

Promise<void>

removeBackground()

Parameters

string
required

Returns

Promise<void>

setBackground()

Parameters

string
required
Uint8Array
required

Returns

Promise<void>

setTyping()

Parameters

string
required
boolean
required

Returns

Promise<void>

shareContactInfo()

Parameters

string
required

Returns

Promise<void>