HubMessage

data class HubMessage(val type: Type, val content: String, val version: Version = V1)

Represents a message which holds either a PluginMessage or a NonSignalMessage. It's main purpose is to extend Message to support a model where it is convenient to transfer non-signal compliant messages.

Constructors

Link copied to clipboard
constructor(type: Type, content: String, version: Version = V1)

Properties

Link copied to clipboard

Message's content which holds, encoded in Json format, either a PluginMessage or a NonSignalMessage. Consumer should decide the serialization strategy based on type.

Link copied to clipboard
val type: Type

The message's Type. Consumers should decode content based on message's type.

Link copied to clipboard

Message's version.