create static method

QuoteContent create(
  1. String text,
  2. Envelope head,
  3. Content body
)

Creates a QuoteContent instance with reply text and original message metadata.

Automatically purifies the original message's envelope/content using QuoteHelper to generate the "origin" field in the quote message.

@param text - User's reply text to the original message

@param head - Envelope of the original message being quoted

@param body - Content of the original message being quoted

@return A new QuoteContent instance

Implementation

static QuoteContent create(String text, Envelope head, Content body) {
  var helper = sharedMessageExtensions.quoteHelper;
  Map origin = helper.purifyForQuote(head, body);
  return BaseQuoteContent.from(text, origin);
}