Home > borogove > ChatMessageBuilder

ChatMessageBuilder class

Signature:

export class borogove_ChatMessageBuilder 

Constructors

Constructor Modifiers Description
(constructor)(params) Constructs a new instance of the borogove_ChatMessageBuilder class

Properties

Property Modifiers Type Description
attachments readonly borogove_ChatAttachment[] Array of attachments to this message
direction borogove_MessageDirection Direction of this message
encryption borogove_EncryptionInfo | null Information about the encryption used by the sender of this message.
lang string | null Language code for the body text
linkMetadata borogove_LinkMetadata[] Metadata about links associated with this message
localId string | null The ID as set by the creator of this message
reactions Map<string,borogove_Reaction[]> Map of reactions to this message
replyToMessage borogove_ChatMessage | null Message this one is in reply to, or NULL
serverId string | null The ID as set by the authoritative server
serverIdBy string | null The ID of the server which set the serverId
status borogove_MessageStatus Status of this message
statusText string | null Human readable text to go with the status
text string | null Body text of this message or NULL
threadId string | null ID of the thread this message is in, or NULL
timestamp string | null The timestamp of this message, in format YYYY-MM-DDThh:mm:ss[.sss]+00:00
type borogove_MessageType The type of this message (Chat, Call, etc)
versions borogove_ChatMessage[] Array of past versions of this message, if it has been edited

Methods

Method Modifiers Description
addAttachment(attachment) Add an attachment to this message
build() Build this builder into an immutable ChatMessage
chatId() The ID of the Chat this message is associated with
get_senderId() The ID of the sender of this message
setHtml(html) Set rich text using an HTML string Also sets the plain text body appropriately