Do not mention original poster when quoting
This commit is contained in:
parent
87353e5ad1
commit
875b46d97d
@ -139,9 +139,6 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraft do
|
|||||||
|
|
||||||
defp quote_post(%{params: %{quote_id: id}} = draft) when not_empty_string(id) do
|
defp quote_post(%{params: %{quote_id: id}} = draft) when not_empty_string(id) do
|
||||||
case Activity.get_by_id_with_object(id) do
|
case Activity.get_by_id_with_object(id) do
|
||||||
%Activity{actor: actor_ap_id} = activity when not_empty_string(actor_ap_id) ->
|
|
||||||
%__MODULE__{draft | quote_post: activity, mentions: [actor_ap_id]}
|
|
||||||
|
|
||||||
%Activity{} = activity ->
|
%Activity{} = activity ->
|
||||||
%__MODULE__{draft | quote_post: activity}
|
%__MODULE__{draft | quote_post: activity}
|
||||||
|
|
||||||
|
@ -808,8 +808,8 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||||||
|
|
||||||
assert quote_post.data["quoteUrl"] == quoted.data["id"]
|
assert quote_post.data["quoteUrl"] == quoted.data["id"]
|
||||||
|
|
||||||
# The OP is mentioned
|
# The OP is not mentioned
|
||||||
assert quoted.data["actor"] in quote_post.data["to"]
|
refute quoted.data["actor"] in quote_post.data["to"]
|
||||||
end
|
end
|
||||||
|
|
||||||
test "quote posting with explicit addressing doesn't mention the OP" do
|
test "quote posting with explicit addressing doesn't mention the OP" do
|
||||||
|
Loading…
Reference in New Issue
Block a user