Home Reference Source
import {ChatMessage} from '@quobis/sippojs'
public class | source

ChatMessage

Instances of this class represents a message of the chat. For more information about how instances of this class can be obtained see Chat#getMessages or Chat#getPendingMessages.

Method Summary

Public Methods
public

Returns the address of the composer of the message.

public

Returns the data of the message.

public

Returns the direction of the direction of the message.

public

Returns the ID of the message.

public

Returns a number between 0 and 100 indicating the percentage of the message that was sent.

public

Returns the current status of the message.

public

Returns the timestamp when the message was send.

public

Returns the type of the message.

public

Returns true when the current status of the message is the specified.

Public Methods

public getComposer(): string source

Returns the address of the composer of the message.

Return:

string

public getData(): string | ChatMessageFile source

Returns the data of the message.

public getDirection(): ChatMessageDirection source

Returns the direction of the direction of the message.

public getId(): string source

Returns the ID of the message.

Return:

string

public getProgress(): number source

Returns a number between 0 and 100 indicating the percentage of the message that was sent. Note that text messages can only have two values: 0 and 100.

Return:

number

public getStatus(): ChatMessageStatus source

Returns the current status of the message.

public getTimestamp(): number source

Returns the timestamp when the message was send.

Return:

number

public getType(): ChatMessageType source

Returns the type of the message.

Return:

ChatMessageType

public hasStatus(status: ChatMessageStatus): boolean source

Returns true when the current status of the message is the specified.

Params:

NameTypeAttributeDescription
status ChatMessageStatus

Return:

boolean