Datalynk Client
Preparing search index...
chat
Chat
Class Chat
API-backed direct messaging. The socket is receive-only.
Index
Constructors
constructor
Properties
api
conversations$
error$
has
More$
loading$
messages$
selected
User$
typing
Users$
unread$
users$
Methods
available
destroy
initialize
load
Conversations
load
Directory
load
History
mark
Latest
Read
retry
select
User
send
set
Typing
Constructors
constructor
new
Chat
(
api
:
Api
)
:
Chat
Parameters
api
:
Api
Returns
Chat
Properties
Readonly
api
api
:
Api
Readonly
conversations$
conversations$
:
BehaviorSubject
<
ChatConversation
[]
>
= ...
Readonly
error$
error$
:
BehaviorSubject
<
null
|
string
>
= ...
Readonly
has
More$
hasMore$
:
BehaviorSubject
<
boolean
>
= ...
Readonly
loading$
loading$
:
BehaviorSubject
<
boolean
>
= ...
Readonly
messages$
messages$
:
BehaviorSubject
<
ChatMessage
[]
>
= ...
Readonly
selected
User$
selectedUser$
:
BehaviorSubject
<
null
|
ChatUser
>
= ...
Readonly
typing
Users$
typingUsers$
:
BehaviorSubject
<
Set
<
number
>
>
= ...
Readonly
unread$
unread$
:
Observable
<
number
>
= ...
Readonly
users$
users$
:
BehaviorSubject
<
ChatUser
[]
>
= ...
Methods
available
available
()
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
destroy
destroy
()
:
void
Returns
void
initialize
initialize
(
force
?:
boolean
)
:
Promise
<
void
>
Parameters
force
:
boolean
= false
Returns
Promise
<
void
>
load
Conversations
loadConversations
()
:
Promise
<
ChatConversation
[]
>
Returns
Promise
<
ChatConversation
[]
>
load
Directory
loadDirectory
(
search
?:
string
,
cursor
?:
string
)
:
Promise
<
ChatUser
[]
>
Parameters
search
:
string
= ''
Optional
cursor
:
string
Returns
Promise
<
ChatUser
[]
>
load
History
loadHistory
(
userId
:
number
,
before
?:
string
)
:
Promise
<
ChatMessage
[]
>
Parameters
userId
:
number
Optional
before
:
string
Returns
Promise
<
ChatMessage
[]
>
mark
Latest
Read
markLatestRead
()
:
Promise
<
void
>
Returns
Promise
<
void
>
retry
retry
(
message
:
ChatMessage
)
:
Promise
<
ChatMessage
>
Parameters
message
:
ChatMessage
Returns
Promise
<
ChatMessage
>
select
User
selectUser
(
user
:
ChatUser
)
:
Promise
<
void
>
Parameters
user
:
ChatUser
Returns
Promise
<
void
>
send
send
(
userId
:
number
,
body
:
string
,
clientId
?:
string
)
:
Promise
<
ChatMessage
>
Parameters
userId
:
number
body
:
string
clientId
:
string
= ...
Returns
Promise
<
ChatMessage
>
set
Typing
setTyping
(
userId
:
number
,
typing
:
boolean
)
:
Promise
<
void
>
Parameters
userId
:
number
typing
:
boolean
Returns
Promise
<
void
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
api
conversations$
error$
has
More$
loading$
messages$
selected
User$
typing
Users$
unread$
users$
Methods
available
destroy
initialize
load
Conversations
load
Directory
load
History
mark
Latest
Read
retry
select
User
send
set
Typing
Datalynk Client
Loading...
API-backed direct messaging. The socket is receive-only.