Make likes and announces public.
authorlain <lain@soykaf.club>
Sun, 25 Feb 2018 17:20:06 +0000 (18:20 +0100)
committerlain <lain@soykaf.club>
Sun, 25 Feb 2018 17:20:06 +0000 (18:20 +0100)
lib/pleroma/web/activity_pub/utils.ex
test/web/ostatus/activity_representer_test.exs

index b32b7240eb201b03bc936d215fb67cc7e50ef868..919cd0bd5141bbda3ffdb8c0b6e7a6efe3803695 100644 (file)
@@ -109,6 +109,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
       "actor" => ap_id,
       "object" => id,
       "to" => [actor.follower_address, object.data["actor"]],
+      "cc" => ["https://www.w3.org/ns/activitystreams#Public"],
       "context" => object.data["context"]
     }
 
@@ -150,6 +151,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
       "type" => "Follow",
       "actor" => follower_id,
       "to" => [followed_id],
+      "cc" => ["https://www.w3.org/ns/activitystreams#Public"],
       "object" => followed_id
     }
 
@@ -177,6 +179,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
       "actor" => ap_id,
       "object" => id,
       "to" => [user.follower_address, object.data["actor"]],
+      "cc" => ["https://www.w3.org/ns/activitystreams#Public"],
       "context" => object.data["context"]
     }
 
index 0a66b819a9b32f1b550b31012ffdaa2ece044d1f..3ee9034a7763c92b09454fd0b2c4983bf7c2ffe4 100644 (file)
@@ -121,6 +121,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
       #{note_xml}
     </activity:object>
     <link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/person" href="#{note.data["actor"]}"/>
+    <link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/collection" href="http://activityschema.org/collection/public"/>
     """
 
     announce_xml = ActivityRepresenter.to_simple_form(announce, user)
@@ -156,6 +157,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
     <link rel="self" type="application/atom+xml" href="#{like.data["id"]}"/>
     <thr:in-reply-to ref="#{note.data["id"]}" />
     <link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/person" href="#{note.data["actor"]}"/>
+    <link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/collection" href="http://activityschema.org/collection/public"/>
     """
 
     assert clean(res) == clean(expected)