Conversation
Defined in: sdks/js/browser-sdk/src/Conversation.ts:37
Represents a conversation
This class is not intended to be initialized directly.
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”ContentTypes
Section titled “ContentTypes”ContentTypes = unknown
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Conversation<
ContentTypes>(worker,codecRegistry,id,data?):Conversation<ContentTypes>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:53
Creates a new conversation instance
Parameters
Section titled “Parameters”worker
Section titled “worker”WorkerBridge<ClientWorkerAction>
The worker bridge instance for client communication
codecRegistry
Section titled “codecRegistry”The codec registry instance
string
The unique identifier for this conversation
Optional conversation data to initialize with
Returns
Section titled “Returns”Conversation<ContentTypes>
Accessors
Section titled “Accessors”addedByInboxId
Section titled “addedByInboxId”Get Signature
Section titled “Get Signature”get addedByInboxId():
string|undefined
Defined in: sdks/js/browser-sdk/src/Conversation.ts:75
Returns
Section titled “Returns”string | undefined
createdAt
Section titled “createdAt”Get Signature
Section titled “Get Signature”get createdAt():
Date|undefined
Defined in: sdks/js/browser-sdk/src/Conversation.ts:83
Returns
Section titled “Returns”Date | undefined
createdAtNs
Section titled “createdAtNs”Get Signature
Section titled “Get Signature”get createdAtNs():
bigint|undefined
Defined in: sdks/js/browser-sdk/src/Conversation.ts:79
Returns
Section titled “Returns”bigint | undefined
Get Signature
Section titled “Get Signature”get id():
string
Defined in: sdks/js/browser-sdk/src/Conversation.ts:71
Returns
Section titled “Returns”string
metadata
Section titled “metadata”Get Signature
Section titled “Get Signature”get metadata():
GroupMetadata|undefined
Defined in: sdks/js/browser-sdk/src/Conversation.ts:87
Returns
Section titled “Returns”GroupMetadata | undefined
Get Signature
Section titled “Get Signature”get topic():
string
Defined in: sdks/js/browser-sdk/src/Conversation.ts:91
Returns
Section titled “Returns”string
Methods
Section titled “Methods”beginningDeliveryCursor()
Section titled “beginningDeliveryCursor()”beginningDeliveryCursor():
Promise<DeliveryCursor>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:520
Returns
Section titled “Returns”Promise<DeliveryCursor>
consentState()
Section titled “consentState()”consentState():
Promise<ConsentState>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:405
Gets the consent state for this conversation
Returns
Section titled “Returns”Promise<ConsentState>
Promise that resolves with the current consent state
countMessages()
Section titled “countMessages()”countMessages(
options?):Promise<bigint>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:390
Counts messages in this conversation
Parameters
Section titled “Parameters”options?
Section titled “options?”Omit<ListMessagesOptions, "limit" | "direction">
Optional filtering options
Returns
Section titled “Returns”Promise<bigint>
Promise that resolves with the count of messages
debugInfo()
Section titled “debugInfo()”debugInfo():
Promise<ConversationDebugInfo>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:546
Retrieves information for this conversation to help with debugging
Returns
Section titled “Returns”Promise<ConversationDebugInfo>
The debug information for this conversation
hmacKeys()
Section titled “hmacKeys()”hmacKeys():
Promise<HmacKeys>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:535
Gets HMAC keys for this conversation
Returns
Section titled “Returns”Promise<HmacKeys>
Promise that resolves with the HMAC keys
isActive()
Section titled “isActive()”isActive():
Promise<boolean>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:104
Returns
Section titled “Returns”Promise<boolean>
isMessageDisappearingEnabled()
Section titled “isMessageDisappearingEnabled()”isMessageDisappearingEnabled():
Promise<boolean>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:472
Checks if message disappearing is enabled for this conversation
Returns
Section titled “Returns”Promise<boolean>
Promise that resolves with whether message disappearing is enabled
lastMessage()
Section titled “lastMessage()”lastMessage():
Promise<DecodedMessage<ContentTypes> |undefined>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:95
Returns
Section titled “Returns”Promise<DecodedMessage<ContentTypes> | undefined>
lastReadTimes()
Section titled “lastReadTimes()”lastReadTimes():
Promise<LastReadTimes>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:558
Retrieves the last read times for this conversation
Returns
Section titled “Returns”Promise<LastReadTimes>
A map keyed by inbox ID with the last read timestamp (nanoseconds since epoch)
members()
Section titled “members()”members():
Promise<GroupMember[]>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:115
Gets the conversation members
Returns
Section titled “Returns”Promise<GroupMember[]>
Promise that resolves with the conversation members
messageDisappearingSettings()
Section titled “messageDisappearingSettings()”messageDisappearingSettings():
Promise<MessageDisappearingSettings|undefined>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:429
Gets the message disappearing settings for this conversation
Returns
Section titled “Returns”Promise<MessageDisappearingSettings | undefined>
Promise that resolves with the current message disappearing settings
messageHistorySnapshot()
Section titled “messageHistorySnapshot()”messageHistorySnapshot(
limit):Promise<MessageHistorySnapshot>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:513
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<MessageHistorySnapshot>
messages()
Section titled “messages()”messages(
options?):Promise<DecodedMessage<ContentTypes>[]>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:372
Lists messages in this conversation
Parameters
Section titled “Parameters”options?
Section titled “options?”Optional filtering and pagination options
Returns
Section titled “Returns”Promise<DecodedMessage<ContentTypes>[]>
Promise that resolves with an array of decoded messages
pausedForVersion()
Section titled “pausedForVersion()”pausedForVersion():
Promise<string|undefined>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:524
Returns
Section titled “Returns”Promise<string | undefined>
processStreamedMessage()
Section titled “processStreamedMessage()”processStreamedMessage(
envelopeBytes):Promise<Message[]>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:151
Decodes, decrypts, and persists a raw envelope from a group message stream.
Parameters
Section titled “Parameters”envelopeBytes
Section titled “envelopeBytes”Uint8Array
Raw protobuf-encoded envelope bytes from the stream
Returns
Section titled “Returns”Promise<Message[]>
The processed and stored messages
publishMessages()
Section titled “publishMessages()”publishMessages():
Promise<void>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:139
Publishes pending messages that were sent optimistically
Returns
Section titled “Returns”Promise<void>
Promise that resolves when publishing is complete
removeMessageDisappearingSettings()
Section titled “removeMessageDisappearingSettings()”removeMessageDisappearingSettings():
Promise<void>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:458
Removes message disappearing settings from this conversation
Returns
Section titled “Returns”Promise<void>
Promise that resolves when the settings are removed
send()
Section titled “send()”send(
content,options?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:171
Sends a message
Parameters
Section titled “Parameters”content
Section titled “content”EncodedContent
The encoded content to send
options?
Section titled “options?”Optional send options
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendActions()
Section titled “sendActions()”sendActions(
actions,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:292
Sends an actions message
Parameters
Section titled “Parameters”actions
Section titled “actions”The actions to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendAttachment()
Section titled “sendAttachment()”sendAttachment(
attachment,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:322
Sends an attachment message
Parameters
Section titled “Parameters”attachment
Section titled “attachment”The attachment to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendIntent()
Section titled “sendIntent()”sendIntent(
intent,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:307
Sends an intent message
Parameters
Section titled “Parameters”intent
Section titled “intent”The intent to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendMarkdown()
Section titled “sendMarkdown()”sendMarkdown(
markdown,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:201
Sends a markdown message
Parameters
Section titled “Parameters”markdown
Section titled “markdown”string
The markdown to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendMultiRemoteAttachment()
Section titled “sendMultiRemoteAttachment()”sendMultiRemoteAttachment(
multiRemoteAttachment,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:337
Sends a multi remote attachment message
Parameters
Section titled “Parameters”multiRemoteAttachment
Section titled “multiRemoteAttachment”The multi remote attachment to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendReaction()
Section titled “sendReaction()”sendReaction(
reaction,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:216
Sends a reaction message
Parameters
Section titled “Parameters”reaction
Section titled “reaction”The reaction to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendReadReceipt()
Section titled “sendReadReceipt()”sendReadReceipt(
opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:230
Sends a read receipt message
Parameters
Section titled “Parameters”Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendRemoteAttachment()
Section titled “sendRemoteAttachment()”sendRemoteAttachment(
remoteAttachment,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:355
Sends a remote attachment message
Parameters
Section titled “Parameters”remoteAttachment
Section titled “remoteAttachment”The remote attachment to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendReply()
Section titled “sendReply()”sendReply(
reply,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:244
Sends a reply message
Parameters
Section titled “Parameters”The reply to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendText()
Section titled “sendText()”sendText(
text,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:186
Sends a text message
Parameters
Section titled “Parameters”string
The text to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendTransactionReference()
Section titled “sendTransactionReference()”sendTransactionReference(
transactionReference,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:259
Sends a transaction reference message
Parameters
Section titled “Parameters”transactionReference
Section titled “transactionReference”The transaction reference to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
sendWalletSendCalls()
Section titled “sendWalletSendCalls()”sendWalletSendCalls(
walletSendCalls,opts?):Promise<string>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:277
Sends a wallet send calls message
Parameters
Section titled “Parameters”walletSendCalls
Section titled “walletSendCalls”The wallet send calls to send
Send options (optimistic delivery, idempotency key)
Returns
Section titled “Returns”Promise<string>
Promise that resolves with the message ID after it has been sent
stream()
Section titled “stream()”stream(
options?):Promise<MessageStream<DecodedMessage|undefined,DecodedMessage<ContentTypes>>>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:487
Reads retained messages after the default acknowledgement position.
Set from to replay after a cursor without changing default progress.
Set onValue for callback mode, or request items with the iterator.
Core owns network recovery. Legacy retry options and disableSync do not apply.
Parameters
Section titled “Parameters”options?
Section titled “options?”StreamOptions<DecodedMessage, DecodedMessage<ContentTypes>> & object
Optional delivery callbacks and replay cursor
Returns
Section titled “Returns”Promise<MessageStream<DecodedMessage | undefined, DecodedMessage<ContentTypes>>>
Stream instance for new messages
sync()
Section titled “sync()”sync():
Promise<SafeConversation>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:126
Synchronizes conversation data from the network
Returns
Section titled “Returns”Promise<SafeConversation>
Promise that resolves with the updated conversation data
updateConsentState()
Section titled “updateConsentState()”updateConsentState(
state):Promise<void>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:417
Updates the consent state for this conversation
Parameters
Section titled “Parameters”The new consent state to set
Returns
Section titled “Returns”Promise<void>
Promise that resolves when the update is complete
updateMessageDisappearingSettings()
Section titled “updateMessageDisappearingSettings()”updateMessageDisappearingSettings(
fromNs,inNs):Promise<void>
Defined in: sdks/js/browser-sdk/src/Conversation.ts:442
Updates message disappearing settings for this conversation
Parameters
Section titled “Parameters”fromNs
Section titled “fromNs”bigint
The timestamp from which messages should start disappearing
bigint
The duration after which messages should disappear
Returns
Section titled “Returns”Promise<void>
Promise that resolves when the update is complete

