Home > borogove > ChatMessage
ChatMessage class
Signature:
export class borogove_ChatMessage
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(params) |
protected
|
Constructs a new instance of the borogove_ChatMessage class
|
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| attachments | Array<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 | |
| linkMetadata | Array<borogove_LinkMetadata> | Metadata about links associated with this message | |
| localId | string | null | The ID as set by the creator of this message | |
| reactions |
readonly
|
Map<string,Array<borogove_Reaction>> | Map of reactions to this message |
| replyToMessage |
readonly
|
borogove_ChatMessage | null | Message this one is in reply to, or NULL |
| senderId | string | The ID of the sender of this message | |
| 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 | Message to go along with the message status | |
| threadId | string | null | ID of the thread this message is in, or NULL | |
| timestamp | string | The timestamp of this message, in format YYYY-MM-DDThh:mm:ss[.sss]Z | |
| type | borogove_MessageType | The type of this message (Chat, Call, etc) | |
| versions | Array<borogove_ChatMessage> | Array of past versions of this message, if it has been edited |
Methods
| Method | Modifiers | Description |
|---|---|---|
| account() | The ID of the account associated with this message | |
| body(sender) | HTML representation of the message body WARNING: this is possibly untrusted HTML. You must parse or sanitize appropriately! | |
| callDuration() | The duration of the call if this message is related to a call | |
| callSid() | The session id of the call if this message is related to a call | |
| callStatus() | The last status of the call if this message is related to a call | |
| canReplace(other) | Is this message the same as or a replacement for some other one? | |
| chatId() | The ID of the Chat this message is associated with | |
| isIncoming() | Is this an incoming message? | |
| moderationReason() | If message is moderated, the reason | |
| reply() | Create a new ChatMessage in reply to this one | |
| senderMemberStub() | A basic Member for the sender, in case the full one can't be loaded | |
| subject() | Subject if present | |
| threadIcon() | The URI of an icon for the thread associated with this message, or NULL |