aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/rich_media/parser.ex2
-rw-r--r--lib/pleroma/web/twitter_api/representers/activity_representer.ex5
-rw-r--r--lib/pleroma/web/twitter_api/views/activity_view.ex5
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/pleroma/web/rich_media/parser.ex b/lib/pleroma/web/rich_media/parser.ex
index 3746feaf6..18d9e2df5 100644
--- a/lib/pleroma/web/rich_media/parser.ex
+++ b/lib/pleroma/web/rich_media/parser.ex
@@ -5,7 +5,7 @@ defmodule Pleroma.Web.RichMedia.Parser do
def parse(url), do: parse_url(url)
else
def parse(url),
- do: {:commit, Cachex.fetch!(:rich_media_cache, url, fn _ -> parse_url(url) end)}
+ do: Cachex.fetch!(:rich_media_cache, url, fn _ -> parse_url(url) end)
end
defp parse_url(url) do
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
index 245cd52fd..47154829d 100644
--- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex
+++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
@@ -181,6 +181,8 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
reply_user = reply_parent && User.get_cached_by_ap_id(reply_parent.actor)
+ summary = HTML.strip_tags(object["summary"])
+
%{
"id" => activity.id,
"uri" => activity.data["object"]["id"],
@@ -207,7 +209,8 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
"activity_type" => "post",
"possibly_sensitive" => possibly_sensitive,
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
- "summary" => HTML.strip_tags(object["summary"]) |> Formatter.emojify(object["emoji"])
+ "summary" => summary,
+ "summary_html" => summary |> Formatter.emojify(object["emoji"])
}
end
diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex
index 25e1486c1..5f4b74842 100644
--- a/lib/pleroma/web/twitter_api/views/activity_view.ex
+++ b/lib/pleroma/web/twitter_api/views/activity_view.ex
@@ -279,6 +279,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
reply_user = reply_parent && User.get_cached_by_ap_id(reply_parent.actor)
+ summary = HTML.strip_tags(summary)
+
%{
"id" => activity.id,
"uri" => activity.data["object"]["id"],
@@ -305,7 +307,8 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
"activity_type" => "post",
"possibly_sensitive" => possibly_sensitive,
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
- "summary" => HTML.strip_tags(summary) |> Formatter.emojify(object["emoji"])
+ "summary" => summary,
+ "summary_html" => summary |> Formatter.emojify(object["emoji"])
}
end