Structure
SystemMessage
public struct SystemMessage: MessageType
Use this MessageType when the Sender is a SystemSender
Relationships
Nested Types
SystemMessage.Style
The style of the SystemMessage.
Conforms To
MessageType
Initializers
init(style:sentDate:)
public init(style: Style, sentDate: Date = Date())
Creates a system message.
Prefer to use the make
factory method over this method.
Parameters
Name | Type | Description |
---|---|---|
style | Style |
The style of the message. |
sentDate | Date |
The date of the message. Defaults to now. |
Properties
sender
public var sender: Sender
messageId
public var messageId: String = UUID().uuidString
sentDate
public var sentDate: Date
kind
public var kind: MessageKind
style
public private(set) var style: Style
Methods
make(style:sentDate:)
public static func make(style: Style, sentDate: Date = Date()) -> SystemMessage
Creates a system message.
Parameters
Name | Type | Description |
---|---|---|
style | Style |
The style of the message. |
sentDate | Date |
The date of the message. Defaults to now. |