diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2024-01-25 10:14:45 +0100 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2024-01-26 17:05:18 +0100 |
commit | 558b4210798657606bcb65debfe1845a9042927c (patch) | |
tree | b639e05fd860604606c86c7f97b36f1f65d1bb24 | |
parent | acef2a4a407058c6dfa4e18aaa9920ab1a82eb94 (diff) | |
download | pleroma-558b4210798657606bcb65debfe1845a9042927c.tar.gz pleroma-558b4210798657606bcb65debfe1845a9042927c.zip |
Test incoming federation from Convergence AP Bridge
-rw-r--r-- | changelog.d/bugfix-ccworks.fix | 1 | ||||
-rw-r--r-- | test/fixtures/ccworld-ap-bridge_note.json | 1 | ||||
-rw-r--r-- | test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs | 11 |
3 files changed, 13 insertions, 0 deletions
diff --git a/changelog.d/bugfix-ccworks.fix b/changelog.d/bugfix-ccworks.fix new file mode 100644 index 000000000..658e27b86 --- /dev/null +++ b/changelog.d/bugfix-ccworks.fix @@ -0,0 +1 @@ +Fix federation with Convergence AP Bridge
\ No newline at end of file diff --git a/test/fixtures/ccworld-ap-bridge_note.json b/test/fixtures/ccworld-ap-bridge_note.json new file mode 100644 index 000000000..4b13b4bc1 --- /dev/null +++ b/test/fixtures/ccworld-ap-bridge_note.json @@ -0,0 +1 @@ +{"@context":"https://www.w3.org/ns/activitystreams","type":"Note","id":"https://cc.mkdir.uk/ap/note/e5d1d0a1-1ab3-4498-9949-588e3fdea286","attributedTo":"https://cc.mkdir.uk/ap/acct/hiira","inReplyTo":"","quoteUrl":"","content":"おはコンー","published":"2024-01-19T22:08:05Z","to":["https://www.w3.org/ns/activitystreams#Public"],"tag":null,"attachment":[],"object":null} diff --git a/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs b/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs index 4703c3801..2b33950d6 100644 --- a/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs +++ b/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs @@ -93,6 +93,17 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest %{valid?: true} = ArticleNotePageValidator.cast_and_validate(note) end + test "a Note from Convergence AP Bridge validates" do + insert(:user, ap_id: "https://cc.mkdir.uk/ap/acct/hiira") + + note = + "test/fixtures/ccworld-ap-bridge_note.json" + |> File.read!() + |> Jason.decode!() + + %{valid?: true} = ArticleNotePageValidator.cast_and_validate(note) + end + test "a note with an attachment should work", _ do insert(:user, %{ap_id: "https://owncast.localhost.localdomain/federation/user/streamer"}) |