aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-10-31 19:51:58 +0100
committerRoger Braun <roger@rogerbraun.net>2017-10-31 19:51:58 +0100
commit6f05367325e7d773ca7199948fd5b49409f6d78d (patch)
tree410f1348b334fd6565dcca471868e5916c0c3f72 /lib
parente014cc6ed8f98e20f5d64f1e666582c62de6321d (diff)
downloadpleroma-6f05367325e7d773ca7199948fd5b49409f6d78d.tar.gz
Federate out content warnings.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/ostatus/activity_representer.ex8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex
index 2092ab7fa..2bff57e76 100644
--- a/lib/pleroma/web/ostatus/activity_representer.ex
+++ b/lib/pleroma/web/ostatus/activity_representer.ex
@@ -83,6 +83,12 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do
emoji_links = get_emoji_links(activity.data["object"]["content"] || "")
+ summary = if activity.data["object"]["summary"] do
+ [{:summary, [], h.(activity.data["object"]["summary"])}]
+ else
+ []
+ end
+
[
{:"activity:object-type", ['http://activitystrea.ms/schema/1.0/note']},
{:"activity:verb", ['http://activitystrea.ms/schema/1.0/post']},
@@ -93,7 +99,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do
{:updated, h.(updated_at)},
{:"ostatus:conversation", [ref: h.(activity.data["context"])], h.(activity.data["context"])},
{:link, [ref: h.(activity.data["context"]), rel: 'ostatus:conversation'], []},
- ] ++ get_links(activity) ++ categories ++ attachments ++ in_reply_to ++ author ++ mentions ++ emoji_links
+ ] ++ summary ++ get_links(activity) ++ categories ++ attachments ++ in_reply_to ++ author ++ mentions ++ emoji_links
end
def to_simple_form(%{data: %{"type" => "Like"}} = activity, user, with_author) do