MessageReplyButton

public struct MessageReplyButton : Hashable, Equatable, Sendable

A reply button rich message sub element.

  • The text displayed in the button

    Declaration

    Swift

    public let text: String
  • A more detailed description of the option

    Declaration

    Swift

    public let description: String?
  • The postback of the button.

    Postback functionality should be used only for some extra automation processing (usually bots) in a way that the bot is not considering the content of the message but postback of the message where he can inject some better (more automatically readable) identifiers than what customer/agent can see in the UI as the content of the message.

    Declaration

    Swift

    public let postback: String?
  • The name of an image that will be displayed as part of the options​ (256 KiB)

    Declaration

    Swift

    public let iconName: String?
  • The URL of an image that will be displayed as part of the options​ (256 KiB)

    Declaration

    Swift

    public let iconUrl: URL?
  • The MIME type of an image that will be displayed as part of the options​ (256 KiB)

    Declaration

    Swift

    public let iconMimeType: String?

Init

  • Creates a MessageReplyButton.

    Declaration

    Swift

    public init(text: String, description: String? = nil, postback: String? = nil, iconName: String? = nil, iconUrl: URL? = nil, iconMimeType: String? = nil)

    Parameters

    text

    The button label shown to the user.

    description

    Optional secondary description displayed alongside the button.

    postback

    Optional opaque payload echoed back to the agent/bot when the user taps the button.

    iconName

    Filename of an optional icon (256 KiB cap).

    iconUrl

    URL of an optional icon (256 KiB cap).

    iconMimeType

    MIME type of the optional icon.