Home > borogove > ChatMessageBuilder

ChatMessageBuilder class

Signature:

export class ChatMessageBuilder 

Constructors

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

Properties

Property Modifiers Type Description
attachments readonly borogove.ChatAttachment[] Array of attachments to this message
direction enums.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
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 enums.MessageStatus Status of this message
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 enums.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