aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/common_api.ex
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-08-31 03:13:59 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-08-31 03:13:59 +0000
commit6aa65b68b82c8ad7f6246dc5ccf1ac7673ce3e22 (patch)
tree4fd80172a392a9ff32f572aa3a95c7c00c0d77a8 /lib/pleroma/web/common_api/common_api.ex
parent1a70d41f8e7ce0eb30242d58077b69816e443c10 (diff)
downloadpleroma-6aa65b68b82c8ad7f6246dc5ccf1ac7673ce3e22.tar.gz
common api: add support for formatting messages outside of twitter-style plain text
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r--lib/pleroma/web/common_api/common_api.ex9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex
index 125c57d05..2ab50c968 100644
--- a/lib/pleroma/web/common_api/common_api.ex
+++ b/lib/pleroma/web/common_api/common_api.ex
@@ -85,7 +85,14 @@ defmodule Pleroma.Web.CommonAPI do
{to, cc} <- to_for_user_and_mentions(user, mentions, inReplyTo, visibility),
tags <- Formatter.parse_tags(status, data),
content_html <-
- make_content_html(status, mentions, attachments, tags, data["no_attachment_links"]),
+ make_content_html(
+ status,
+ mentions,
+ attachments,
+ tags,
+ data["content_type"] || "text/plain",
+ data["no_attachment_links"]
+ ),
context <- make_context(inReplyTo),
cw <- data["spoiler_text"],
object <-