+ "published" => DateTime.utc_now() |> DateTime.to_iso8601,
+ "context" => note.data["context"]
+ }
+
+ %Pleroma.Activity{
+ data: data
+ }
+ end
+
+ def like_activity_factory do
+ note_activity = insert(:note_activity)
+ user = insert(:user)
+
+ data = %{
+ "id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id,
+ "actor" => user.ap_id,
+ "type" => "Like",
+ "object" => note_activity.data["object"]["id"],
+ "published_at" => DateTime.utc_now() |> DateTime.to_iso8601
+ }
+
+ %Pleroma.Activity{
+ data: data
+ }
+ end
+
+ def follow_activity_factory do
+ follower = insert(:user)
+ followed = insert(:user)
+
+ data = %{
+ "id" => Pleroma.Web.ActivityPub.Utils.generate_activity_id,
+ "actor" => follower.ap_id,
+ "type" => "Follow",
+ "object" => followed.ap_id,