summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2022-01-23 15:46:44 -0600
committertusooa <tusooa@kazv.moe>2023-09-13 19:19:04 -0400
commit54a989793878c63900d2c6de7b4ffc8fbd8fe8c6 (patch)
treea8fb8c392de08a4d3d41a445d5b9e4b8425b452c /test
parent80ab2572a4d5590d738cc763a87156b3f79362fb (diff)
downloadpleroma-54a989793878c63900d2c6de7b4ffc8fbd8fe8c6.tar.gz
pleroma-54a989793878c63900d2c6de7b4ffc8fbd8fe8c6.zip
ActivityDraft: mention the OP of a quoted post
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/common_api_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index 734e6dd82..051e770d7 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -807,6 +807,18 @@ defmodule Pleroma.Web.CommonAPITest do
quote_post = Object.normalize(quote_post)
assert quote_post.data["quoteUrl"] == quoted.data["id"]
+
+ # The OP is mentioned
+ assert quoted.data["actor"] in quote_post.data["to"]
+ end
+
+ test "quote posting with explicit addressing doesn't mention the OP" do
+ user = insert(:user)
+
+ {:ok, quoted} = CommonAPI.post(user, %{status: "Hello world"})
+ {:ok, quote_post} = CommonAPI.post(user, %{status: "nice post", quote_id: quoted.id, to: []})
+
+ assert Object.normalize(quote_post).data["to"] == [Pleroma.Constants.as_public()]
end
end