KUSChatMessage

KUSChatMessage Class reference for Kustomer Chat iOS Core API.

A message in a conversation. Belongs to a single KUSConversation.

public class KUSChatMessage : CustomStringConvertible

id

public var id: String

conversationId

public var conversationId: String?

createdAt

public var createdAt: Date?

status

public var status: KUSChatMessageStatus?

direction

Direction of the message.

When building a chat interface, use this to set which side of the screen to display the message on.

public var direction: KUSChatMessageDirection?

body

Message body, in markdown.

public var body: String?

attachments

Attached images, videos, or files (if any)

public var attachments: [KUSChatAttachment]

templateType

Message template type

public var templateType: KUSMessageTemplateType?

Sender of message

sentById

ID of entity that composed this message

When building a chat interface, use KUSChatMessage.direction to set which side of the screen to display the message on.

public var sentById: String?

sentByType

Entity that composed this message.

When building a chat interface, use KUSChatMessage.direction to set which side of the screen to display the message on.

public var sentByType: KUSSentByType?

actions

For messages with associated quick reply buttons. To reply to this message, pass one of these actions to ChatProvider.shared.sendChatMessage(action:, completion:)

public var actions: [KUSMessageAction]?

mllNode

For messages with associated quick reply buttons. To reply to this message, pass one of these actions to ChatProvider.shared.sendChatMessage(mllNode:, completion:)

public var mllNode: KUSMLLNode?

deflectResults

For messages generated by KB deflect chat assistant responses. Contains matched articles.

public var deflectResults: [KUSKBDeflectResult]?

templateRawJson

Raw JSON of the message template

public var templateRawJson: String?

CustomStringConvertible

description

public var description: String { get }