mastodon_parse_quoted: extracts the quoted / embedded texts of a mastodon status, in...

View source: R/sm-mastodon-api.R

mastodon_parse_quotedR Documentation

extracts the quoted / embedded texts of a mastodon status, in the same spirit as bluesky_parse_quoted(): everything that carries text around the status itself is collected and concatenated into a single 'quoted_text' used downstream for keyword matching.

Description

The mastodon cases and their bluesky counterparts:

  • quote post ('status$quote$quoted_status', mastodon >= 4.4) and boost ('status$reblog') ~ bluesky 'embed$record': the content of the quoted / boosted status. These are the only cases that set 'is_quote'.

  • link preview card ('card', title + description) ~ bluesky 'embed$external'. Like bluesky, a card alone does NOT make the status a quote.

  • media alternative texts ('media_attachments[[i]]$description') ~ bluesky 'embed$images[[i]]$alt'.

  • polls ('poll') are acknowledged but their options are not collected, like bluesky videos / poll facets.

A quoted / boosted status is a full Status object of its own: it carries its own 'card' and its own 'media_attachments', and those are harvested too (bluesky does the same by reading 'post$embed$record$embeds[[i]]$external'). A quote post whose card is the only place where the keyword appears would otherwise be missed.

Usage

mastodon_parse_quoted(status)

Arguments

status

list, the status to extract data from, in mastodon format

Details

Texts coming from a status content are kept as raw html, consistently with the 'text' field of mastodon_parse_response() (see the html question in the vignette).


episomer documentation built on Nov. 26, 2026, 5:07 p.m.