Fix MRF reject for ChatMessage
This commit is contained in:
parent
abf25e5d52
commit
7bf269fe83
6 changed files with 30 additions and 5 deletions
|
|
@ -217,6 +217,17 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
|
||||
assert message == :content_too_long
|
||||
end
|
||||
|
||||
test "it reject messages via MRF" do
|
||||
clear_config([:mrf_keyword, :reject], ["GNO"])
|
||||
clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.KeywordPolicy])
|
||||
|
||||
author = insert(:user)
|
||||
recipient = insert(:user)
|
||||
|
||||
assert {:reject, "[KeywordPolicy] Matches with rejected keyword"} ==
|
||||
CommonAPI.post_chat_message(author, recipient, "GNO/Linux")
|
||||
end
|
||||
end
|
||||
|
||||
describe "unblocking" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue