diff options
| author | lain <lain@soykaf.club> | 2020-06-23 10:17:12 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-06-23 10:17:12 +0200 |
| commit | 2c603f20098d7f342e1cbad8e6a6c86b007c5a99 (patch) | |
| tree | dd9a339daed6a25e758167413d9231e22ce42ac4 /test/web/activity_pub | |
| parent | b05f795326b77edd881ffea2c004d7ca0ddd7df9 (diff) | |
| parent | 3875a507d4b52df7edbda376d3ed31ad52241ac5 (diff) | |
| download | pleroma-2c603f20098d7f342e1cbad8e6a6c86b007c5a99.tar.gz pleroma-2c603f20098d7f342e1cbad8e6a6c86b007c5a99.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into update-validator
Diffstat (limited to 'test/web/activity_pub')
| -rw-r--r-- | test/web/activity_pub/mrf/hellthread_policy_test.exs | 18 | ||||
| -rw-r--r-- | test/web/activity_pub/transmogrifier_test.exs | 3 |
2 files changed, 17 insertions, 4 deletions
diff --git a/test/web/activity_pub/mrf/hellthread_policy_test.exs b/test/web/activity_pub/mrf/hellthread_policy_test.exs index 95ef0b168..6e9daa7f9 100644 --- a/test/web/activity_pub/mrf/hellthread_policy_test.exs +++ b/test/web/activity_pub/mrf/hellthread_policy_test.exs @@ -8,6 +8,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicyTest do import Pleroma.Web.ActivityPub.MRF.HellthreadPolicy + alias Pleroma.Web.CommonAPI + setup do user = insert(:user) @@ -20,7 +22,10 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicyTest do "https://instance.tld/users/user1", "https://instance.tld/users/user2", "https://instance.tld/users/user3" - ] + ], + "object" => %{ + "type" => "Note" + } } [user: user, message: message] @@ -28,6 +33,17 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicyTest do setup do: clear_config(:mrf_hellthread) + test "doesn't die on chat messages" do + Pleroma.Config.put([:mrf_hellthread], %{delist_threshold: 2, reject_threshold: 0}) + + user = insert(:user) + other_user = insert(:user) + + {:ok, activity} = CommonAPI.post_chat_message(user, other_user, "moin") + + assert {:ok, _} = filter(activity.data) + end + describe "reject" do test "rejects the message if the recipient count is above reject_threshold", %{ message: message diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs index b542bb7b8..100821056 100644 --- a/test/web/activity_pub/transmogrifier_test.exs +++ b/test/web/activity_pub/transmogrifier_test.exs @@ -1415,9 +1415,6 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do assert modified_object["inReplyToAtomUri"] == "https://shitposter.club/notice/2827873" - assert modified_object["conversation"] == - "tag:shitposter.club,2017-05-05:objectType=thread:nonce=3c16e9c2681f6d26" - assert modified_object["context"] == "tag:shitposter.club,2017-05-05:objectType=thread:nonce=3c16e9c2681f6d26" end |
