Message
public struct Message
extension Message: Equatable
Represents all info about a message in a chat.
-
The unique id for the message.
Declaration
Swift
public let id: UUID -
The thread id for the message.
Declaration
Swift
public let threadId: UUID -
The content of the message
Declaration
Swift
public let contentType: MessageContentType -
The timestamp of when the message was created.
Declaration
Swift
public let createdAt: Date -
The attachments on the message.
Declaration
Swift
public let attachments: [Attachment] -
The direction that the message is being sent (in regards to the agent).
Declaration
Swift
public let direction: MessageDirection -
Statistic information about the message (read status, viewed status, etc.).
Declaration
Swift
public let userStatistics: UserStatistics? -
The agent that sent the message. Only present if the direction is to client (outbound).
Declaration
Swift
public let authorUser: Agent? -
The customer that sent the message. Only present if the direction is to agent (inbound).
Declaration
Swift
public let authorEndUserIdentity: CustomerIdentity? -
Information about the sender of a message.
Declaration
Swift
public var senderInfo: SenderInfo { get } -
The delivery or read status of the message.
Declaration
Swift
public var status: MessageStatus { get }
-
init(id:threadId: contentType: createdAt: attachments: direction: userStatistics: authorUser: authorEndUserIdentity: ) Declaration
Swift
public init( id: UUID, threadId: UUID, contentType: MessageContentType, createdAt: Date, attachments: [Attachment], direction: MessageDirection, userStatistics: UserStatistics?, authorUser: Agent?, authorEndUserIdentity: CustomerIdentity? )Parameters
idThe unique id for the message.
threadIdThe thread id for the message.
messageContentThe content of the message
createdAtThe timestamp of when the message was created.
attachmentsThe attachments on the message.
directionThe direction that the message is being sent (in regards to the agent).
userStatisticsStatistic information about the message (read status, viewed status, etc.).
authorUserThe agent that sent the message. Only present if the direction is to client (outbound).
authorEndUserIdentityThe customer that sent the message. Only present if the direction is to agent (inbound).
-
Declaration
Swift
public static func == (lhs: Message, rhs: Message) -> Bool
View on GitHub