Options
All
  • Public
  • Public/Protected
  • All
Menu

Message builder. Allows the message to be built and sent via method chaining.

Example:

await testConversation.prepareMessage()
  .setBody('Hello!')
  .setAttributes({foo: 'bar'})
  .addMedia(media1)
  .addMedia(media2)
  .build()
  .send();

Hierarchy

  • MessageBuilder

Index

Methods

addMedia

build

  • Builds the message, making it ready to be sent.

    Returns UnsentMessage

setAttributes

  • Sets the message attributes.

    Parameters

    • attributes: any

      Message attributes.

    Returns MessageBuilder

setBody

  • Sets the message body.

    Parameters

    • text: string

      Contents of the body.

    Returns MessageBuilder

setSubject

  • Sets the message subject.

    Parameters

    • subject: string

      Contents of the subject.

    Returns MessageBuilder