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
id
The unique id for the message.
threadId
The thread id for the message.
messageContent
The content of the message
createdAt
The timestamp of when the message was created.
attachments
The attachments on the message.
direction
The direction that the message is being sent (in regards to the agent).
userStatistics
Statistic information about the message (read status, viewed status, etc.).
authorUser
The agent that sent the message. Only present if the direction is to client (outbound).
authorEndUserIdentity
The customer that sent the message. Only present if the direction is to agent (inbound).
-
Declaration
Swift
public static func == (lhs: Message, rhs: Message) -> Bool