MessagePayload

public struct MessagePayload : Equatable, Sendable

All info about a payload of a message.

  • The content of the payload.

    Declaration

    Swift

    public let text: String
  • The postback of the payload.

    Declaration

    Swift

    public let postback: String?
  • Creates a message payload.

    Declaration

    Swift

    public init(text: String, postback: String? = nil)

    Parameters

    text

    The visible message text shown in the conversation.

    postback

    Optional opaque payload echoed back to the agent/bot when this message is part of a rich-content reply.