Rate this page:

TextAndAttachments

Represents a message that contains text and attachments.

Constructors

TextAndAttachments

Copy URL
fun TextAndAttachments(text: 

String

,
attachments:

List<Attachment>

):

Creates an outbound message with text and several attachments.

Throws IllegalArgumentException if

Parameters

  • text:

    String

    Message text.

  • attachments:

    List<Attachment>

    Message attachments.

Props

attachments

Copy URL
val attachments: 

List<Attachment>

List of message attachments.

Returns

date

Copy URL
val date: 

Long?

Message timestamp in milliseconds.

Available only if the message is sent.

Returns

  • type:

    Long?

requestId

Copy URL
val requestId: 

String?

Temporary message id.

Available only if the message is sent from an application.

Returns

  • type:

    String?

sender

Copy URL
val sender: 

Sender

Sender of the message.

Returns

text

Copy URL
val text: 

String

Message text. Cannot be empty.

Returns

  • type:

    String

uuid

Copy URL
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

Copy URL
fun equals(other: 

Any?

):

Boolean

Parameters

  • other:

    Any?

    Optional

Returns

  • type:

    Boolean

hashCode

Copy URL
fun hashCode(): 

Int

Returns

  • type:

    Int

toString

Copy URL
fun toString(): 

String

Returns

  • type:

    String