Message

open class Message

This class represents a Message on Cisco Webex.

Since

0.1

Constructors

Link copied to clipboard
fun Message()

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface Draft

Encapsulating the content will be post. A draft is created by Message.draft}

Link copied to clipboard
class Text

The wrapper for the message text in different formats: plain text, markdown, or html. Text will be in one of the format.

Functions

Link copied to clipboard
open fun getCreated(): Long

Time when message was created

Link copied to clipboard
open fun getFiles(): MutableList<RemoteFile>

Returns the attachment with the message

Link copied to clipboard
open fun getId(): String?

Returns the message id

Link copied to clipboard
open fun getMentions(): MutableList<Mention>

Returns all people mentioned in the message

Link copied to clipboard
open fun getParentId(): String?

Returns the parent if this message is a reply message.

Link copied to clipboard
open fun getPersonDisplayName(): String?

Returns the name of the person who sent this message.

Link copied to clipboard
open fun getPersonEmail(): String?

Returns the email address of the person who sent this message.

Link copied to clipboard
open fun getPersonId(): String?

Returns the identifier of the person who sent this message.

Link copied to clipboard
open fun getSpaceId(): String?

Returns the identifier of the space where this message was posted.

Link copied to clipboard
open fun getSpaceType(): Space.SpaceType

Returns the conversation type such as group, or direct

Link copied to clipboard
open fun getText(): String?

Returns the text contained in the message. Returned text format would be html, markdown or plain text. To know the format of the text use getTextAsObject

Link copied to clipboard
open fun getTextAsObject(): Message.Text

Returns the content of the message as Text object. This method can be used to know the text and its format. Text would be one of html, markdown or plain text format. Depending on the message to get the text Text.getHtml or Text.getMarkdown or Text.getPlain needs to be used

Link copied to clipboard
open fun getToPersonEmail(): String?

Returns the email address of the recipient when sending a private 1:1 message.

Link copied to clipboard
open fun getToPersonId(): String?

Returns the identifier of the recipient when sending a private 1:1 message.

Link copied to clipboard
open fun isAllMentioned(): Boolean

Returns true if the message mentioned everyone in space.

Link copied to clipboard
open fun isContentDecrypted(): Boolean

Returns true if the content of the message is decrypted

Link copied to clipboard
open fun isReply(): Boolean

Checks if this is a reply message.

Link copied to clipboard
open fun isSelfMentioned(): Boolean

Returns true if the message is the recipient of the message is included in message's mention list

Link copied to clipboard
open override fun toString(): String

Returns the message in JSON string format.