TextAndAttachments
Represents a message that contains text and attachments.
Constructors
TextAndAttachments
fun TextAndAttachments(text: String
, attachments: List<Attachment>
):
Creates an outbound message with text and several attachments.
Throws IllegalArgumentException if
- the text is an empty string or its length exceeds KitChat.MAX_TEXT_LENGTH.
- at least one attachment files' MIME type is not one of the KitChat.SUPPORTED_DOCUMENT_MIME_TYPES.
- the size of at least one of the attachment files exceeds KitChat.MAX_FILE_SIZE.
Parameters
text:
String
Message text.
attachments:
List<Attachment>
Message attachments.
Props
attachments
val attachments: List<Attachment>
List of message attachments.
Returns
type:
List<Attachment>
date
val date: Long?
Message timestamp in milliseconds.
Available only if the message is sent.
Returns
type:
Long?
requestId
val requestId: String?
Temporary message id.
Available only if the message is sent from an application.
Returns
type:
String?
text
val text: String
Message text. Cannot be empty.
Returns
type:
String
uuid
val uuid: String?
Universal unique ID of the message.
Null for the messages that have not yet been sent from an application, i.e. created or currently being sent via KitChat.sendMessage.
Non null for inbound messages.
Returns
type:
String?
Methods
equals
fun equals(other: Any?
): Boolean
Parameters
other:
Any?
Optional
Returns
type:
Boolean
hashCode
fun hashCode(): Int
Returns
type:
Int
toString
fun toString(): String
Returns
type:
String