From 4f7adb343c66dba0a3c6883cd9f4156fb43594d4 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 15 Apr 2017 14:16:01 +0200 Subject: [PATCH] Address liking / announcing to the original author. --- lib/pleroma/web/activity_pub/activity_pub.ex | 4 ++-- test/web/activity_pub/activity_pub_test.exs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index b2508de68..0d3360ee1 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -33,7 +33,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do "type" => "Like", "actor" => ap_id, "object" => id, - "to" => [User.ap_followers(user)] + "to" => [User.ap_followers(user), object.data["actor"]] } {:ok, activity} = insert(data) @@ -142,7 +142,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do "type" => "Announce", "actor" => ap_id, "object" => id, - "to" => [User.ap_followers(user)] + "to" => [User.ap_followers(user), object.data["actor"]] } {:ok, activity} = insert(data) diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs index b5f81da0c..b0c2a3544 100644 --- a/test/web/activity_pub/activity_pub_test.exs +++ b/test/web/activity_pub/activity_pub_test.exs @@ -124,7 +124,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do assert like_activity.data["actor"] == user.ap_id assert like_activity.data["type"] == "Like" assert like_activity.data["object"] == object.data["id"] - assert like_activity.data["to"] == [User.ap_followers(user)] + assert like_activity.data["to"] == [User.ap_followers(user), note_activity.data["actor"]] assert object.data["like_count"] == 1 assert object.data["likes"] == [user.ap_id] @@ -171,7 +171,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do {:ok, announce_activity, object} = ActivityPub.announce(user, object) assert object.data["announcement_count"] == 1 assert object.data["announcements"] == [user.ap_id] - assert announce_activity.data["to"] == [User.ap_followers(user)] + assert announce_activity.data["to"] == [User.ap_followers(user), note_activity.data["actor"]] assert announce_activity.data["object"] == object.data["id"] assert announce_activity.data["actor"] == user.ap_id end -- 2.45.2