SendMessageData

class SendMessageData

Wraps a MessageData instance with optional targeting and reply metadata for sending a message in a conversation.

  • An optional list of person IDs to restrict the message to specific recipients. If nil, the message is sent to all participants.

    Declaration

    Swift

    var recipientPersonIds: [String]?
  • The ID of an existing message this message is replying to. If nil, the message is not a reply.

    Declaration

    Swift

    var replyToMessageId: String?
  • The message data containing the content and type of the message to send.

    Declaration

    Swift

    let messageData: MessageData
  • Encodes this value into the given encoder.

    If the value fails to encode anything, encoder will encode an empty keyed container in its place.

    This function throws an error if any values are invalid for the given encoder’s format.

    Declaration

    Swift

    func encode(to encoder: any Encoder) throws