Use follower address in user entry.
This commit is contained in:
parent
396c32a6da
commit
140f72725d
@ -99,7 +99,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
|
|||||||
"type" => "Like",
|
"type" => "Like",
|
||||||
"actor" => ap_id,
|
"actor" => ap_id,
|
||||||
"object" => id,
|
"object" => id,
|
||||||
"to" => [User.ap_followers(actor), object.data["actor"]],
|
"to" => [actor.follower_address, object.data["actor"]],
|
||||||
"context" => object.data["context"]
|
"context" => object.data["context"]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
|
|||||||
"type" => "Announce",
|
"type" => "Announce",
|
||||||
"actor" => ap_id,
|
"actor" => ap_id,
|
||||||
"object" => id,
|
"object" => id,
|
||||||
"to" => [User.ap_followers(user), object.data["actor"]],
|
"to" => [user.follower_address, object.data["actor"]],
|
||||||
"context" => object.data["context"]
|
"context" => object.data["context"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do
|
|||||||
|
|
||||||
def make_to_list(actor, mentions) do
|
def make_to_list(actor, mentions) do
|
||||||
[
|
[
|
||||||
User.ap_followers(actor)
|
actor.follower_address
|
||||||
] ++ mentions
|
] ++ mentions
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||||||
|
|
||||||
def to_for_user_and_mentions(user, mentions, inReplyTo) do
|
def to_for_user_and_mentions(user, mentions, inReplyTo) do
|
||||||
default_to = [
|
default_to = [
|
||||||
User.ap_followers(user),
|
user.follower_address,
|
||||||
"https://www.w3.org/ns/activitystreams#Public"
|
"https://www.w3.org/ns/activitystreams#Public"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -9,7 +9,8 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
|
|||||||
import Pleroma.Factory
|
import Pleroma.Factory
|
||||||
|
|
||||||
test "create a status" do
|
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"})
|
_mentioned_user = UserBuilder.insert(%{nickname: "shp", ap_id: "shp"})
|
||||||
|
|
||||||
object_data = %{
|
object_data = %{
|
||||||
|
Loading…
Reference in New Issue
Block a user