diff options
author | lain <lain@soykaf.club> | 2020-04-22 12:48:52 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-04-22 12:48:52 +0200 |
commit | 2e62a63749e040b108b8afe2c8839c470f89fa04 (patch) | |
tree | ebc0f2bb464c92c043c5ab9c1491edd8c831d865 /test | |
parent | 6c8390fa4d47a86c34bcc71681ba30f04d14eae9 (diff) | |
download | pleroma-2e62a63749e040b108b8afe2c8839c470f89fa04.tar.gz |
ChatMessageValidator: Validation changes
Don't validate if the recipient is blocking the actor.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/object_validator_test.exs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/web/activity_pub/object_validator_test.exs b/test/web/activity_pub/object_validator_test.exs index 8230ae0d9..bc2317e55 100644 --- a/test/web/activity_pub/object_validator_test.exs +++ b/test/web/activity_pub/object_validator_test.exs @@ -33,6 +33,15 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do refute match?({:ok, _object, _meta}, ObjectValidator.validate(valid_chat_message, [])) end + test "does not validate if the recipient is blocking the actor", %{ + valid_chat_message: valid_chat_message, + user: user, + recipient: recipient + } do + Pleroma.User.block(recipient, user) + refute match?({:ok, _object, _meta}, ObjectValidator.validate(valid_chat_message, [])) + end + test "does not validate if the actor or the recipient is not in our system", %{ valid_chat_message: valid_chat_message } do |