logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 140f72725dd3d2840b356107e24542ba2896e4e1
parent: 396c32a6da5d028675b2d3c4154ac9045596ad31
Author: Roger Braun <roger@rogerbraun.net>
Date:   Wed, 19 Jul 2017 19:06:49 +0200

Use follower address in user entry.

Diffstat:

Mlib/pleroma/web/activity_pub/utils.ex4++--
Mlib/pleroma/web/ostatus/handlers/note_handler.ex2+-
Mlib/pleroma/web/twitter_api/twitter_api.ex2+-
Mtest/web/twitter_api/twitter_api_test.exs3++-
4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex @@ -99,7 +99,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do "type" => "Like", "actor" => ap_id, "object" => id, - "to" => [User.ap_followers(actor), object.data["actor"]], + "to" => [actor.follower_address, object.data["actor"]], "context" => object.data["context"] } @@ -167,7 +167,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do "type" => "Announce", "actor" => ap_id, "object" => id, - "to" => [User.ap_followers(user), object.data["actor"]], + "to" => [user.follower_address, object.data["actor"]], "context" => object.data["context"] } diff --git a/lib/pleroma/web/ostatus/handlers/note_handler.ex b/lib/pleroma/web/ostatus/handlers/note_handler.ex @@ -61,7 +61,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do def make_to_list(actor, mentions) do [ - User.ap_followers(actor) + actor.follower_address ] ++ mentions end diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex @@ -12,7 +12,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do def to_for_user_and_mentions(user, mentions, inReplyTo) do default_to = [ - User.ap_followers(user), + user.follower_address, "https://www.w3.org/ns/activitystreams#Public" ] diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs @@ -9,7 +9,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do import Pleroma.Factory test "create a status" do - user = UserBuilder.build(%{ap_id: "142344"}) + # user = UserBuilder.build(%{ap_id: "142344"}) + user = insert(:user, %{ap_id: "142344"}) _mentioned_user = UserBuilder.insert(%{nickname: "shp", ap_id: "shp"}) object_data = %{