Initializer
init(type:data:identifier:)
Creates a message given a type, a data payload, and an identifier.
init(type: MessageType, data: AnyCodable?, identifier: String?)
Parameters
typeThe type of the message.
dataThe data payload of the message.
identifierThe identifier of the message.