Merge branch 'mastoapi/plaintext-statuses' into 'develop'

Provide plaintext representations of content/cw in MastoAPI

Closes #787

See merge request pleroma/pleroma!1035
This commit is contained in:
rinpatch 2019-04-09 17:25:31 +00:00
commit 144648de92
3 changed files with 32 additions and 7 deletions

View file

@ -101,7 +101,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
muted: false,
pinned: false,
sensitive: false,
spoiler_text: note.data["object"]["summary"],
spoiler_text: HtmlSanitizeEx.basic_html(note.data["object"]["summary"]),
visibility: "public",
media_attachments: [],
mentions: [],
@ -126,7 +126,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
],
pleroma: %{
local: true,
conversation_id: convo_id
conversation_id: convo_id,
content: %{"text/plain" => HtmlSanitizeEx.strip_tags(note.data["object"]["content"])},
spoiler_text: %{"text/plain" => HtmlSanitizeEx.strip_tags(note.data["object"]["summary"])}
}
}