Message

interface Message

Representation of a Conversations Message object.

Types

Link copied to clipboard
enum UpdateReason
Indicates reason for message update.

Functions

Link copied to clipboard
abstract fun getAggregatedDeliveryReceipt(): AggregatedDeliveryReceipt
Returns AggregatedDeliveryReceipt for the message.
Link copied to clipboard
abstract fun getAttachedMedia(): List<Media>
Returns all media attachments, except email body/history attachments.
Link copied to clipboard
abstract fun getAttributes(): Attributes
Retrieve attributes associated with this message.
Link copied to clipboard
abstract fun getAuthor(): String
The global identity of the author of this message.
Link copied to clipboard
abstract fun getBody(): String
The body for this message.
Link copied to clipboard
abstract fun getContentData(listener: CallbackListener<ContentData>): CancellationToken
Returns ContentData for this message when getContentSid is not `null`, otherwise calls onError.
Link copied to clipboard
abstract fun getContentSid(): String
Returns unique identifier for ContentTemplate for this message.
Link copied to clipboard
abstract fun getConversation(): Conversation
Returns the parent conversation this message belongs to.
Link copied to clipboard
abstract fun getConversationSid(): String
Returns the conversation SID of the conversation this message belongs to.
Link copied to clipboard
abstract fun getDateCreated(): String
The creation date for this message.
Link copied to clipboard
abstract fun getDateCreatedAsDate(): Date
The creation timestamp for this message.
Link copied to clipboard
abstract fun getDateUpdated(): String
The timestamp when this message was updated last time.
Link copied to clipboard
abstract fun getDateUpdatedAsDate(): Date
The Date when this message was updated last time.
Link copied to clipboard
abstract fun getDetailedDeliveryReceiptList(listener: CallbackListener<List<DetailedDeliveryReceipt>>)
Returns list of DetailedDeliveryReceipt per each Participant for the Message.
Link copied to clipboard
abstract fun getEmailBody(): Media
Returns email body attachment for the "text/plain" content type.
abstract fun getEmailBody(contentType: String): Media
Returns email body attachment of specific content type.
Link copied to clipboard
abstract fun getEmailHistory(): Media
Returns email history attachment for the "text/plain" content type.
abstract fun getEmailHistory(contentType: String): Media
Returns email history attachment of specific content type.
Link copied to clipboard
abstract fun getLastUpdatedBy(): String
Returns the identity of the user who updated the message.
Link copied to clipboard
abstract fun getMediaByCategories(categories: Set<MediaCategory>): List<Media>
Returns a (possibly empty) List of media matching a specific set of categories.
Link copied to clipboard
abstract fun getMessageIndex(): Long
Returns the index number for this message.
Link copied to clipboard
abstract fun getParticipant(): Participant
Returns the participant this message was sent by.
Link copied to clipboard
abstract fun getParticipantSid(): String
Returns the participant SID of the participant this message was sent by.
Link copied to clipboard
abstract fun getSid(): String
Returns the identifier for this message.
Link copied to clipboard
abstract fun getSubject(): String
The subject for this message.
Link copied to clipboard
abstract fun getTemporaryContentUrlsForAttachedMedia(listener: CallbackListener<Map<String, String>>): CancellationToken
Get content URLs for all attached media returned by getAttachedMedia using single network request.
Link copied to clipboard
abstract fun getTemporaryContentUrlsForMedia(media: List<Media>, listener: CallbackListener<Map<String, String>>): CancellationToken
Get content URLs for all media attachments in the given set using single network request.
Link copied to clipboard
abstract fun getTemporaryContentUrlsForMediaSids(mediaSids: List<String>, listener: CallbackListener<Map<String, String>>): CancellationToken
Get content URLs for all media attachments in the given set using single network request.
Link copied to clipboard
abstract fun setAttributes(attributes: Attributes, listener: StatusListener)
Set attributes associated with this message.
Link copied to clipboard
abstract fun updateBody(body: String, listener: StatusListener)
Updates the body for a message.