From 2d7850ccfbfc70ac058315995c9774cb2ae91c10 Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Thu, 10 Mar 2022 23:29:25 +0000 Subject: [PATCH] [PLUGIN][ActivityPub][Tests] Borrow test fixtures from Lemmy --- .../friendica/activities/create_note.jsonld | 82 ++++++++++++++++ .../fixtures/friendica/objects/note.jsonld | 56 +++++++++++ .../fixtures/friendica/objects/person.jsonld | 94 +++++++++++++++++++ .../lemmy/activities/block/block_user.jsonld | 16 ++++ .../activities/block/undo_block_user.jsonld | 27 ++++++ .../lemmy/activities/community/add_mod.jsonld | 13 +++ .../community/announce_create_page.jsonld | 37 ++++++++ .../activities/community/remove_mod.jsonld | 13 +++ .../activities/community/report_page.jsonld | 10 ++ .../community/update_community.jsonld | 37 ++++++++ .../create_or_update/create_note.jsonld | 35 +++++++ .../create_or_update/create_page.jsonld | 32 +++++++ .../create_private_message.jsonld | 23 +++++ .../create_or_update/update_page.jsonld | 33 +++++++ .../activities/deletion/delete_page.jsonld | 12 +++ .../deletion/delete_private_message.jsonld | 9 ++ .../activities/deletion/remove_note.jsonld | 13 +++ .../deletion/undo_delete_page.jsonld | 23 +++++ .../undo_delete_private_message.jsonld | 17 ++++ .../deletion/undo_remove_note.jsonld | 24 +++++ .../lemmy/activities/following/accept.jsonld | 11 +++ .../lemmy/activities/following/follow.jsonld | 6 ++ .../activities/following/undo_follow.jsonld | 11 +++ .../activities/voting/dislike_page.jsonld | 12 +++ .../lemmy/activities/voting/like_note.jsonld | 12 +++ .../voting/undo_dislike_page.jsonld | 23 +++++ .../activities/voting/undo_like_note.jsonld | 23 +++++ .../lemmy/collections/group_followers.jsonld | 6 ++ .../lemmy/collections/group_moderators.jsonld | 7 ++ .../lemmy/collections/group_outbox.jsonld | 61 ++++++++++++ .../lemmy/collections/person_outbox.jsonld | 6 ++ .../tests/fixtures/lemmy/context.jsonld | 19 ++++ .../lemmy/objects/chat_message.jsonld | 15 +++ .../tests/fixtures/lemmy/objects/group.jsonld | 34 +++++++ .../fixtures/lemmy/objects/instance.jsonld | 20 ++++ .../tests/fixtures/lemmy/objects/note.jsonld | 26 +++++ .../tests/fixtures/lemmy/objects/page.jsonld | 25 +++++ .../fixtures/lemmy/objects/person.jsonld | 32 +++++++ .../fixtures/lemmy/objects/tombstone.jsonld | 4 + .../activities/create_note_reply.jsonld | 30 ++++++ .../lotide/activities/create_page.jsonld | 20 ++++ .../lotide/activities/delete_note.jsonld | 7 ++ .../fixtures/lotide/objects/group.jsonld | 28 ++++++ .../tests/fixtures/lotide/objects/note.jsonld | 19 ++++ .../tests/fixtures/lotide/objects/page.jsonld | 12 +++ .../fixtures/lotide/objects/person.jsonld | 22 +++++ .../fixtures/lotide/objects/tombstone.jsonld | 6 ++ .../mastodon/activities/create_note.jsonld | 62 ++++++++++++ .../mastodon/activities/delete.jsonld | 26 +++++ .../mastodon/activities/follow.jsonld | 7 ++ .../mastodon/activities/undo_follow.jsonld | 13 +++ .../fixtures/mastodon/objects/note.jsonld | 54 +++++++++++ .../fixtures/mastodon/objects/person.jsonld | 93 ++++++++++++++++++ .../pleroma/activities/create_note.jsonld | 52 ++++++++++ .../fixtures/pleroma/activities/delete.jsonld | 35 +++++++ .../fixtures/pleroma/activities/follow.jsonld | 18 ++++ .../pleroma/objects/chat_message.jsonld | 17 ++++ .../fixtures/pleroma/objects/note.jsonld | 36 +++++++ .../fixtures/pleroma/objects/person.jsonld | 79 ++++++++++++++++ .../smithereen/activities/create_note.jsonld | 56 +++++++++++ .../fixtures/smithereen/objects/note.jsonld | 38 ++++++++ .../fixtures/smithereen/objects/person.jsonld | 83 ++++++++++++++++ 62 files changed, 1772 insertions(+) create mode 100755 plugins/ActivityPub/tests/fixtures/friendica/activities/create_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/friendica/objects/note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/friendica/objects/person.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/block/block_user.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/block/undo_block_user.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/community/add_mod.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/community/announce_create_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/community/remove_mod.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/community/report_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/community/update_community.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_private_message.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/update_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/delete_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/delete_private_message.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/remove_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_delete_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_delete_private_message.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_remove_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/following/accept.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/following/follow.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/following/undo_follow.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/dislike_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/like_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/undo_dislike_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/undo_like_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/collections/group_followers.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/collections/group_moderators.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/collections/group_outbox.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/collections/person_outbox.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/context.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/objects/chat_message.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/objects/group.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/objects/instance.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/objects/note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/objects/page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/objects/person.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lemmy/objects/tombstone.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lotide/activities/create_note_reply.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lotide/activities/create_page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lotide/activities/delete_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lotide/objects/group.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lotide/objects/note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lotide/objects/page.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lotide/objects/person.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/lotide/objects/tombstone.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/mastodon/activities/create_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/mastodon/activities/delete.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/mastodon/activities/follow.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/mastodon/activities/undo_follow.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/mastodon/objects/note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/mastodon/objects/person.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/pleroma/activities/create_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/pleroma/activities/delete.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/pleroma/activities/follow.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/pleroma/objects/chat_message.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/pleroma/objects/note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/pleroma/objects/person.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/smithereen/activities/create_note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/smithereen/objects/note.jsonld create mode 100755 plugins/ActivityPub/tests/fixtures/smithereen/objects/person.jsonld diff --git a/plugins/ActivityPub/tests/fixtures/friendica/activities/create_note.jsonld b/plugins/ActivityPub/tests/fixtures/friendica/activities/create_note.jsonld new file mode 100755 index 0000000000..2bfaaefef4 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/friendica/activities/create_note.jsonld @@ -0,0 +1,82 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + { + "vcard": "http://www.w3.org/2006/vcard/ns#", + "dfrn": "http://purl.org/macgirvin/dfrn/1.0/", + "diaspora": "https://diasporafoundation.org/ns/", + "litepub": "http://litepub.social/ns#", + "toot": "http://joinmastodon.org/ns#", + "schema": "http://schema.org#", + "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", + "sensitive": "as:sensitive", + "Hashtag": "as:Hashtag", + "directMessage": "litepub:directMessage", + "discoverable": "toot:discoverable", + "PropertyValue": "schema:PropertyValue", + "value": "schema:value" + } + ], + "id": "https://soc.schuerz.at/objects/4edd2508-4361-edb8-c4d8-b45181083984/Create", + "type": "Create", + "actor": "https://soc.schuerz.at/profile/jakob", + "published": "2022-01-23T20:21:24Z", + "instrument": { + "type": "Service", + "name": "Friendica 'Siberian Iris' 2021.12-rc-1448", + "url": "https://soc.schuerz.at" + }, + "to": [ + "https://lemmy.schuerz.at/u/jakob", + "https://www.w3.org/ns/activitystreams#Public", + "https://lemmy.schuerz.at/c/test" + ], + "cc": [ + "https://soc.schuerz.at/followers/jakob" + ], + "object": { + "id": "https://soc.schuerz.at/objects/4edd2508-4361-edb8-c4d8-b45181083984", + "type": "Note", + "summary": "", + "inReplyTo": "https://lemmy.schuerz.at/post/25360", + "diaspora:guid": "4edd2508-4361-edb8-c4d8-b45181083984", + "published": "2022-01-23T20:21:24Z", + "url": "https://soc.schuerz.at/display/4edd2508-4361-edb8-c4d8-b45181083984", + "attributedTo": "https://soc.schuerz.at/profile/jakob", + "sensitive": false, + "context": "https://lemmy.schuerz.at/post/25360#context", + "content": "@jakob test", + "contentMap": { + "de": "@jakob test" + }, + "source": { + "content": "@[url=https://lemmy.schuerz.at/u/jakob]Jakob[/url] test", + "mediaType": "text/bbcode" + }, + "diaspora:comment": "{\"author\":\"jakob@soc.schuerz.at\",\"guid\":\"4edd2508-4361-edb8-c4d8-b45181083984\",\"created_at\":\"2022-01-23T20:21:24Z\",\"edited_at\":\"2022-01-23T20:21:24Z\",\"parent_guid\":\"ea620d1e-742c8b4d15249a9b-18b5fca3\",\"text\":\"@{Jakob; jakob@lemmy.schuerz.at} test\",\"author_signature\":\"JNCqOui5Cg8\\/Uxw+f0NtGCRjRnhPOrqE6kGJnMkZvOOKhlCdZbCqvyPlNJzEYDa3Z30mOWQKTTNo5BVI+VVZtGrVEqFOdzNog7jOLQoY1dKU9iEQ9vc8USwUCkyJyv48w1iXpfea87KPwv+03DMlftmD6kC7jdUVwhc7+jm0g4fh06tpOcCMQJOZqTTV\\/80EjxIJQ+8eEk5evSw\\/S98ohD1ahcwSomJ9hJUV1H48ucDvMod1FCLcN5h4ALHqubCu4TZIYhGhw9zoCl52GeHhrD3\\/vL6OW4ftZ7UG4rEKQ4HowuXqmNwydrQldtprRtu2UrZBjLqVusPXEs\\/xERQqZnalNXHijyd1TwwCmfTV4YjKwH4BhX\\/p4hdWMqEP4yYXlfA4apalVeAaYZLrNR58kPJjBHad\\/yqH30ziBFheqZ5odFh\\/jnKB4OCFVST3u9b1OKE0jyTrbTepPTaONwc8giQH1sM8koj1gFdulwuJuOTRUKR\\/8ishgHi5SWwbp5YG5Z3YSINkF10IcLiFZAF300AvwgOCdf7ferim4i\\/7TR1D2CBpoNUZnKCKZRymZbE0GuKEE+A6Pk3lk\\/DCsDtmMXpnxlPZ8Nq8OZS\\/olXevAu1y57MNnxBDXtojr4F54MP2fO7E2JwBr7AlwoeSEvtZSAO\\/elzrKfW0eVWOUM2OnI=\"}", + "attachment": [], + "tag": [ + { + "type": "Mention", + "href": "https://lemmy.schuerz.at/u/jakob", + "name": "@jakob@lemmy.schuerz.at" + } + ], + "to": [ + "https://lemmy.schuerz.at/u/jakob", + "https://www.w3.org/ns/activitystreams#Public", + "https://lemmy.schuerz.at/c/test" + ], + "cc": [ + "https://soc.schuerz.at/followers/jakob" + ] + }, + "signature": { + "type": "RsaSignature2017", + "nonce": "fe42f1478453c9c5e92efdc8a1b00c7e2dd2ce89501f2437c4438b8add1c8ff7", + "creator": "https://soc.schuerz.at/profile/jakob#main-key", + "created": "2022-01-23T20:21:25Z", + "signatureValue": "iWeNKyfH/d5+f6FDmZIadF4hW7XBliL8w3PQ2QkeKQG7fheqx1MB6825JX+Eaq8C0aNESesTTiDJgy3Xdcw8tgKwAVdji2DNZh7rNbSy57AzXlXOPRDnGJUbXp8gAuW2PJNZx3TTsJ5yM7tKLmHk0PpwsnKbvjFabL5O+htyfRZNVjFAsB9bVym/dBvf4jiTZiLufGDprgsaDVygUi3QrzmwsE41NZtL/MIEtbiC5pROWQvdQBEzeLfMDsnjI4CR+3tnaSlvepipuFxeSFpwl5Ae5+YM6IYRvSDsssjr8kAg1t3XnHUyeBdBdys0A6ryR5t5QuY0ygAHFs+X633JsgHDuCxxHiqNYxFuTs1xO0gmHydFy1iKlEt2rbr9pcX05hSvEFg0bI8HEC5M9GuafpY7sOyLX0jobBUH9CxdHUu0qri4ntORlvvAYsGFNHj+folFlMRBNMkcZ+MbrAxdoXBdjhsAp+tD6nje+PeZy63yJJQmPLQi9E+fHGGe0DAobGrBE/XF8X1ABH+ywyKwVu0t6lkSxu+zdr9+JXKgnf7HaFSsknapumw9aQwC7N/Q0M5KO41fF0R4VL2GtoppyB9Ck9Dg1zwMWjL2KZN3ckbWABb+frWtmKIVQACzupRWzHiHSZjRRNJalK3uugVisHF2PFGkjYoUjHDCNegKHO0=" + } +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/friendica/objects/note.jsonld b/plugins/ActivityPub/tests/fixtures/friendica/objects/note.jsonld new file mode 100755 index 0000000000..4c23babeba --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/friendica/objects/note.jsonld @@ -0,0 +1,56 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + { + "vcard": "http://www.w3.org/2006/vcard/ns#", + "dfrn": "http://purl.org/macgirvin/dfrn/1.0/", + "diaspora": "https://diasporafoundation.org/ns/", + "litepub": "http://litepub.social/ns#", + "toot": "http://joinmastodon.org/ns#", + "schema": "http://schema.org#", + "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", + "sensitive": "as:sensitive", + "Hashtag": "as:Hashtag", + "directMessage": "litepub:directMessage", + "discoverable": "toot:discoverable", + "PropertyValue": "schema:PropertyValue", + "value": "schema:value" + } + ], + "id": "https://soc.schuerz.at/objects/4edd2508-4361-edb8-c4d8-b45181083984", + "type": "Note", + "summary": "", + "inReplyTo": "https://lemmy.schuerz.at/post/25360", + "diaspora:guid": "4edd2508-4361-edb8-c4d8-b45181083984", + "published": "2022-01-23T20:21:24Z", + "url": "https://soc.schuerz.at/display/4edd2508-4361-edb8-c4d8-b45181083984", + "attributedTo": "https://soc.schuerz.at/profile/jakob", + "sensitive": false, + "context": "https://lemmy.schuerz.at/post/25360#context", + "content": "@jakob test", + "contentMap": { + "de": "@jakob test" + }, + "source": { + "content": "@[url=https://lemmy.schuerz.at/u/jakob]Jakob[/url] test", + "mediaType": "text/bbcode" + }, + "diaspora:comment": "{\"author\":\"jakob@soc.schuerz.at\",\"guid\":\"4edd2508-4361-edb8-c4d8-b45181083984\",\"created_at\":\"2022-01-23T20:21:24Z\",\"edited_at\":\"2022-01-23T20:21:24Z\",\"parent_guid\":\"ea620d1e-742c8b4d15249a9b-18b5fca3\",\"text\":\"@{Jakob; jakob@lemmy.schuerz.at} test\",\"author_signature\":\"JNCqOui5Cg8\\/Uxw+f0NtGCRjRnhPOrqE6kGJnMkZvOOKhlCdZbCqvyPlNJzEYDa3Z30mOWQKTTNo5BVI+VVZtGrVEqFOdzNog7jOLQoY1dKU9iEQ9vc8USwUCkyJyv48w1iXpfea87KPwv+03DMlftmD6kC7jdUVwhc7+jm0g4fh06tpOcCMQJOZqTTV\\/80EjxIJQ+8eEk5evSw\\/S98ohD1ahcwSomJ9hJUV1H48ucDvMod1FCLcN5h4ALHqubCu4TZIYhGhw9zoCl52GeHhrD3\\/vL6OW4ftZ7UG4rEKQ4HowuXqmNwydrQldtprRtu2UrZBjLqVusPXEs\\/xERQqZnalNXHijyd1TwwCmfTV4YjKwH4BhX\\/p4hdWMqEP4yYXlfA4apalVeAaYZLrNR58kPJjBHad\\/yqH30ziBFheqZ5odFh\\/jnKB4OCFVST3u9b1OKE0jyTrbTepPTaONwc8giQH1sM8koj1gFdulwuJuOTRUKR\\/8ishgHi5SWwbp5YG5Z3YSINkF10IcLiFZAF300AvwgOCdf7ferim4i\\/7TR1D2CBpoNUZnKCKZRymZbE0GuKEE+A6Pk3lk\\/DCsDtmMXpnxlPZ8Nq8OZS\\/olXevAu1y57MNnxBDXtojr4F54MP2fO7E2JwBr7AlwoeSEvtZSAO\\/elzrKfW0eVWOUM2OnI=\"}", + "attachment": [], + "tag": [ + { + "type": "Mention", + "href": "https://lemmy.schuerz.at/u/jakob", + "name": "@jakob@lemmy.schuerz.at" + } + ], + "to": [ + "https://lemmy.schuerz.at/u/jakob", + "https://www.w3.org/ns/activitystreams#Public", + "https://lemmy.schuerz.at/c/test" + ], + "cc": [ + "https://soc.schuerz.at/followers/jakob" + ] +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/friendica/objects/person.jsonld b/plugins/ActivityPub/tests/fixtures/friendica/objects/person.jsonld new file mode 100755 index 0000000000..1b1895ef48 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/friendica/objects/person.jsonld @@ -0,0 +1,94 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + { + "vcard": "http://www.w3.org/2006/vcard/ns#", + "dfrn": "http://purl.org/macgirvin/dfrn/1.0/", + "diaspora": "https://diasporafoundation.org/ns/", + "litepub": "http://litepub.social/ns#", + "toot": "http://joinmastodon.org/ns#", + "schema": "http://schema.org#", + "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", + "sensitive": "as:sensitive", + "Hashtag": "as:Hashtag", + "directMessage": "litepub:directMessage", + "discoverable": "toot:discoverable", + "PropertyValue": "schema:PropertyValue", + "value": "schema:value" + } + ], + "id": "https://soc.schuerz.at/profile/jakob", + "diaspora:guid": "4edd2508-1661-30f6-ebcc-2da966353356", + "type": "Person", + "following": "https://soc.schuerz.at/following/jakob", + "followers": "https://soc.schuerz.at/followers/jakob", + "inbox": "https://soc.schuerz.at/inbox/jakob", + "outbox": "https://soc.schuerz.at/outbox/jakob", + "preferredUsername": "jakob", + "name": "Jakob :friendica:", + "vcard:hasAddress": { + "@type": "vcard:Home", + "vcard:country-name": "Austria", + "vcard:region": "Niederoesterreich", + "vcard:locality": "" + }, + "summary": "Linux, FOSS, Öffentlicher Verkehr, Eisenbahn, Radfahren, Fußgehen, Verkehrsplanung, Städtebau, Will das Schöne wieder in die Welt bringen,Nachhaltigkeit, Modellbahn, Java Entwickler (jun), Bash,

#FediverseOnlyAccount", + "vcard:hasInstantMessage": [ + "xmpp:jakob@schuerz.at", + "matrix:@jakob:schuerz.at" + ], + "url": "https://soc.schuerz.at/profile/jakob", + "manuallyApprovesFollowers": true, + "discoverable": true, + "publicKey": { + "id": "https://soc.schuerz.at/profile/jakob#main-key", + "owner": "https://soc.schuerz.at/profile/jakob", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1RRoj3DpUmTiRBshv+kz\njO5tgfHs99aBJjvaoW8nbPcOs+HZm9Nj4ncJh99kwd+yONwac6ObMMIisYpVU4C1\neKpnlRrRu/8vQFwhHQT4RxpkibB+l+LvG1HJoMNIuYxvVCIaQZugdJclAdMJjDTF\nbDQNwG6xlcazKd4IbMbmgfoxTxSnQSomJQew1NUbdD3vDiCdJEtjCmeWm6eTCfyZ\njT0mjrAm8ccJ7+opN5SWJ0je0Rav5dohyaVFEtv1Dlv1UlqU4hKefvv71eoROHCA\nWQ3+kYGFGY4ApnbWxwLZyke7khzxr2BjDrfwUAeEsLJT4YOxa5fKJJ59+q5Iddaq\nPNT3QqP0Qzum5w6qDOWm3cNNw7ByqoqxKckZS5U2vm0sx83UEmBqysAkAS/8M9Qr\nBKkb9DQ9jgUa7GPpL+Oknr8hV+Vpk49Jjx+A1WJ/MlNja7fi4w4rBM+v3B8nRayM\nzX8XaKbbOib21mCawJiJIOAm0EP2rNqNM1GpUWPstHKG00o3Czz3P5Hm/q6RcNJE\nKRlSIPQZnUVsoC0bFsqWzipsgb3uDHnz3Ni2OjLNLWBVYkWD7RNfB3WV/XKl2QL3\nnnhmUDahGN7UCOrcBuLfWsTa+GZDFeHot1HXa9tNcxq+QxAUg3qv7oiAH1H+hoJg\nn/Ydg1IR5sLovKi3g7DRS7MCAwEAAQ==\n-----END PUBLIC KEY-----\n" + }, + "endpoints": { + "sharedInbox": "https://soc.schuerz.at/inbox" + }, + "icon": { + "type": "Image", + "url": "https://soc.schuerz.at/photo/profile/jakob.png?ts=1630598950", + "mediaType": "image/png" + }, + "attachment": [ + { + "type": "PropertyValue", + "name": "Mobilizon", + "value": "@jakob@events.schuerz.at
@jakob@events.tulln.social" + }, + { + "type": "PropertyValue", + "name": "Lemmy", + "value": "https://lemmy.schuerz.at/u/jakob" + }, + { + "type": "PropertyValue", + "name": "Funkwhale", + "value": "https://radio.schuerz.at/@jakob/" + }, + { + "type": "PropertyValue", + "name": "Peertube", + "value": "https://kino.schuerz.at/a/jakob" + }, + { + "type": "PropertyValue", + "name": "Pixelfed", + "value": "https://japix.schuerz.at/jakob" + }, + { + "type": "PropertyValue", + "name": "about:", + "value": "This is an OpenPGP proof that connects my OpenPGP key to this Peertube account. For details check out https://keyoxide.org/guides/openpgp-proofs

[Verifying my OpenPGP key: openpgp4fpr:FED82F1C73FF53FB1EE9926336615E0FD12833CF]" + } + ], + "generator": { + "type": "Service", + "name": "Friendica 'Siberian Iris' 2021.12-rc-1448", + "url": "https://soc.schuerz.at" + } +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/block/block_user.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/block/block_user.jsonld new file mode 100755 index 0000000000..a12b68e7e5 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/block/block_user.jsonld @@ -0,0 +1,16 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/u/lemmy_alpha", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "target": "http://enterprise.lemmy.ml/c/main", + "type": "Block", + "remove_data": "true", + "summary": "spam post", + "expires": "2021-11-01T12:23:50.151874+00:00", + "id": "http://enterprise.lemmy.ml/activities/block/5d42fffb-0903-4625-86d4-0b39bb344fc2" +} diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/block/undo_block_user.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/block/undo_block_user.jsonld new file mode 100755 index 0000000000..41c9aad776 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/block/undo_block_user.jsonld @@ -0,0 +1,27 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/u/lemmy_alpha", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "target": "http://enterprise.lemmy.ml/c/main", + "type": "Block", + "remove_data": "true", + "summary": "spam post", + "expires": "2021-11-01T12:23:50.151874+00:00", + "id": "http://enterprise.lemmy.ml/activities/block/726f43ab-bd0e-4ab3-89c8-627e976f553c" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Undo", + "id": "http://enterprise.lemmy.ml/activities/undo/06a20ffb-3e32-42fb-8f4c-674b36d7c557" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/add_mod.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/add_mod.jsonld new file mode 100755 index 0000000000..d0eedd8bfd --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/add_mod.jsonld @@ -0,0 +1,13 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/u/lemmy_alpha", + "target": "http://enterprise.lemmy.ml/c/main/moderators", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Add", + "id": "http://enterprise.lemmy.ml/activities/add/ec069147-77c3-447f-88c8-0ef1df10403f" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/announce_create_page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/announce_create_page.jsonld new file mode 100755 index 0000000000..6b58cf1cf3 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/announce_create_page.jsonld @@ -0,0 +1,37 @@ +{ + "actor": "http://enterprise.lemmy.ml/c/main", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "type": "Page", + "id": "http://enterprise.lemmy.ml/post/7", + "attributedTo": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "http://enterprise.lemmy.ml/c/main", + "https://www.w3.org/ns/activitystreams#Public" + ], + "name": "post 4", + "mediaType": "text/html", + "commentsEnabled": true, + "sensitive": false, + "stickied": false, + "published": "2021-11-01T12:11:22.871846+00:00" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Create", + "id": "http://enterprise.lemmy.ml/activities/create/2807c9ec-3ad8-4859-a9e0-28b59b6e499f" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main/followers" + ], + "type": "Announce", + "id": "http://enterprise.lemmy.ml/activities/announce/8030b171-803a-4108-94b1-342688f375cf" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/remove_mod.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/remove_mod.jsonld new file mode 100755 index 0000000000..2932fec37a --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/remove_mod.jsonld @@ -0,0 +1,13 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/u/lemmy_alpha", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Remove", + "target": "http://enterprise.lemmy.ml/c/main/moderators", + "id": "http://enterprise.lemmy.ml/activities/remove/aab114f8-cfbd-4935-a5b7-e1a64603650d" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/report_page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/report_page.jsonld new file mode 100755 index 0000000000..bd1691b57b --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/report_page.jsonld @@ -0,0 +1,10 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "http://enterprise.lemmy.ml/c/main" + ], + "object": "http://enterprise.lemmy.ml/post/7", + "summary": "report this post", + "type": "Flag", + "id": "http://ds9.lemmy.ml/activities/flag/98b0933f-5e45-4a95-a15f-e0dc86361ba4" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/update_community.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/update_community.jsonld new file mode 100755 index 0000000000..275d6d2ba3 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/community/update_community.jsonld @@ -0,0 +1,37 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "type": "Group", + "id": "http://enterprise.lemmy.ml/c/main", + "preferredUsername": "main", + "name": "The Updated Community", + "summary": "

updated 2

\n", + "source": { + "content": "updated 2", + "mediaType": "text/markdown" + }, + "sensitive": false, + "moderators": "http://enterprise.lemmy.ml/c/main/moderators", + "inbox": "http://enterprise.lemmy.ml/c/main/inbox", + "outbox": "http://enterprise.lemmy.ml/c/main/outbox", + "followers": "http://enterprise.lemmy.ml/c/main/followers", + "endpoints": { + "sharedInbox": "http://enterprise.lemmy.ml/inbox" + }, + "publicKey": { + "id": "http://enterprise.lemmy.ml/c/main#main-key", + "owner": "http://enterprise.lemmy.ml/c/main", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA16Xh06V1l2yy0WAIMUTV\nnvZIuAuKDxzDQUNT+n8gmcVuvBu7tkpbPTQ3DjGB3bQfGC2ekew/yldwOXyZ7ry1\npbJSYSrCBJrAlPLs/ao3OPTqmcl3vnSWti/hqopEV+Um2t7fwpkCjVrnzVKRSlys\nihnrth64ZiwAqq2llpaXzWc1SR2URZYSdnry/4d9UNrZVkumIeg1gk9KbCAo4j/O\njsv/aBjpZcTeLmtMZf6fcrvGre9duJdx6e2Tg/YNcnSnARosqev/UwVTzzGNVWXg\n9rItaa0a0aea4se4Bn6QXvOBbcq3+OYZMR6a34hh5BTeNG8WbpwmVahS0WFUsv9G\nswIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "published": "2021-10-29T15:05:51.476984+00:00", + "updated": "2021-11-01T12:23:50.151874+00:00" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Update", + "id": "http://ds9.lemmy.ml/activities/update/d3717cf5-096d-473f-9530-5d52f9d51f5f" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_note.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_note.jsonld new file mode 100755 index 0000000000..33ce1cfd94 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_note.jsonld @@ -0,0 +1,35 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "type": "Note", + "id": "http://ds9.lemmy.ml/comment/1", + "attributedTo": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "content": "hello", + "mediaType": "text/html", + "source": { + "content": "hello", + "mediaType": "text/markdown" + }, + "inReplyTo": "http://ds9.lemmy.ml/post/1", + "published": "2021-11-01T11:45:49.794920+00:00" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main", + "http://ds9.lemmy.ml/u/lemmy_alpha" + ], + "tag": [ + { + "href": "http://ds9.lemmy.ml/u/lemmy_alpha", + "type": "Mention", + "name": "@lemmy_alpha@ds9.lemmy.ml" + } + ], + "type": "Create", + "id": "http://ds9.lemmy.ml/activities/create/1e77d67c-44ac-45ed-bf2a-460e21f60236" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_page.jsonld new file mode 100755 index 0000000000..b223120b06 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_page.jsonld @@ -0,0 +1,32 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "type": "Page", + "id": "http://ds9.lemmy.ml/post/1", + "attributedTo": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "http://enterprise.lemmy.ml/c/main", + "https://www.w3.org/ns/activitystreams#Public" + ], + "name": "test post", + "content": "

test body

\n", + "mediaType": "text/html", + "source": { + "content": "test body", + "mediaType": "text/markdown" + }, + "url": "https://lemmy.ml/pictrs/image/xl8W7FZfk9.jpg", + "commentsEnabled": true, + "sensitive": false, + "stickied": false, + "published": "2021-10-29T15:10:51.557399+00:00" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Create", + "id": "http://ds9.lemmy.ml/activities/create/eee6a57a-622f-464d-b560-73ae1fcd3ddf" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_private_message.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_private_message.jsonld new file mode 100755 index 0000000000..de080a8f9c --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/create_private_message.jsonld @@ -0,0 +1,23 @@ +{ + "id": "http://enterprise.lemmy.ml/activities/create/987d05fa-f637-46d7-85be-13d112bc269f", + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "http://ds9.lemmy.ml/u/lemmy_alpha" + ], + "object": { + "type": "ChatMessage", + "id": "http://enterprise.lemmy.ml/private_message/1", + "attributedTo": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "http://ds9.lemmy.ml/u/lemmy_alpha" + ], + "content": "hello", + "mediaType": "text/html", + "source": { + "content": "hello", + "mediaType": "text/markdown" + }, + "published": "2021-10-29T15:31:56.058289+00:00" + }, + "type": "Create" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/update_page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/update_page.jsonld new file mode 100755 index 0000000000..beadfa0d1f --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/create_or_update/update_page.jsonld @@ -0,0 +1,33 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "type": "Page", + "id": "http://ds9.lemmy.ml/post/1", + "attributedTo": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "http://enterprise.lemmy.ml/c/main", + "https://www.w3.org/ns/activitystreams#Public" + ], + "name": "test post 1", + "content": "

test body

\n", + "mediaType": "text/html", + "source": { + "content": "test body", + "mediaType": "text/markdown" + }, + "url": "https://lemmy.ml/pictrs/image/xl8W7FZfk9.jpg", + "commentsEnabled": true, + "sensitive": false, + "stickied": false, + "published": "2021-10-29T15:10:51.557399+00:00", + "updated": "2021-10-29T15:11:35.976374+00:00" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Update", + "id": "http://ds9.lemmy.ml/activities/update/ab360117-e165-4de4-b7fc-906b62c98631" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/delete_page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/delete_page.jsonld new file mode 100755 index 0000000000..8dd26a109e --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/delete_page.jsonld @@ -0,0 +1,12 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/post/1", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Delete", + "id": "http://ds9.lemmy.ml/activities/delete/f2abee48-c7bb-41d5-9e27-8775ff32db12" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/delete_private_message.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/delete_private_message.jsonld new file mode 100755 index 0000000000..f5f85ac3ea --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/delete_private_message.jsonld @@ -0,0 +1,9 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "http://enterprise.lemmy.ml/u/lemmy_beta" + ], + "object": "http://enterprise.lemmy.ml/private_message/1", + "type": "Delete", + "id": "http://enterprise.lemmy.ml/activities/delete/041d9858-5eef-4ad9-84ae-7455b4d87ed9" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/remove_note.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/remove_note.jsonld new file mode 100755 index 0000000000..8ea354044f --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/remove_note.jsonld @@ -0,0 +1,13 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/comment/1", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Delete", + "summary": "bad comment", + "id": "http://enterprise.lemmy.ml/activities/delete/42ca1a79-f99e-4518-a2ca-ba2df221eb5e" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_delete_page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_delete_page.jsonld new file mode 100755 index 0000000000..9f824fa1f8 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_delete_page.jsonld @@ -0,0 +1,23 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/post/1", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Delete", + "id": "http://ds9.lemmy.ml/activities/delete/b13cca96-7737-41e1-9769-8fbf972b3509" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Undo", + "id": "http://ds9.lemmy.ml/activities/undo/5e939cfb-b8a1-4de8-950f-9d684e9162b9" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_delete_private_message.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_delete_private_message.jsonld new file mode 100755 index 0000000000..d9b4ed75a6 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_delete_private_message.jsonld @@ -0,0 +1,17 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "http://ds9.lemmy.ml/u/lemmy_alpha" + ], + "object": { + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "http://enterprise.lemmy.ml/u/lemmy_beta" + ], + "object": "http://enterprise.lemmy.ml/private_message/1", + "type": "Delete", + "id": "http://enterprise.lemmy.ml/activities/delete/616c41be-04ed-4bd4-b865-30712186b122" + }, + "type": "Undo", + "id": "http://enterprise.lemmy.ml/activities/undo/35e5b337-014c-4bbe-8d63-6fac96f51409" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_remove_note.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_remove_note.jsonld new file mode 100755 index 0000000000..413cf16b4e --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/deletion/undo_remove_note.jsonld @@ -0,0 +1,24 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/comment/1", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Delete", + "summary": "bad comment", + "id": "http://enterprise.lemmy.ml/activities/delete/2598435c-87a3-49cd-81f3-a44b03b7af9d" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Undo", + "id": "http://enterprise.lemmy.ml/activities/undo/a850cf21-3866-4b3a-b80b-56aa00997fee" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/accept.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/accept.jsonld new file mode 100755 index 0000000000..4097b36754 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/accept.jsonld @@ -0,0 +1,11 @@ +{ + "actor": "http://enterprise.lemmy.ml/c/main", + "object": { + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "object": "http://enterprise.lemmy.ml/c/main", + "type": "Follow", + "id": "http://ds9.lemmy.ml/activities/follow/6abcd50b-b8ca-4952-86b0-a6dd8cc12866" + }, + "type": "Accept", + "id": "http://enterprise.lemmy.ml/activities/accept/75f080cc-3d45-4654-8186-8f3bb853fa27" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/follow.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/follow.jsonld new file mode 100755 index 0000000000..48f3fef8b7 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/follow.jsonld @@ -0,0 +1,6 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "object": "http://enterprise.lemmy.ml/c/main", + "type": "Follow", + "id": "http://ds9.lemmy.ml/activities/follow/6abcd50b-b8ca-4952-86b0-a6dd8cc12866" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/undo_follow.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/undo_follow.jsonld new file mode 100755 index 0000000000..5311bd990b --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/following/undo_follow.jsonld @@ -0,0 +1,11 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "object": { + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "object": "http://enterprise.lemmy.ml/c/main", + "type": "Follow", + "id": "http://ds9.lemmy.ml/activities/follow/dc2f1bc5-f3a0-4daa-a46b-428cbfbd023c" + }, + "type": "Undo", + "id": "http://ds9.lemmy.ml/activities/undo/dd83c482-8ebd-4b6c-9008-c8373bd1a86a" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/dislike_page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/dislike_page.jsonld new file mode 100755 index 0000000000..822a9d3570 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/dislike_page.jsonld @@ -0,0 +1,12 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/post/1", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Dislike", + "id": "http://enterprise.lemmy.ml/activities/dislike/64d40d40-a829-43a5-8247-1fb595b3ca1c" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/like_note.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/like_note.jsonld new file mode 100755 index 0000000000..35e9690601 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/like_note.jsonld @@ -0,0 +1,12 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/comment/1", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Like", + "id": "http://ds9.lemmy.ml/activities/like/fd61d070-7382-46a9-b2b7-6bb253732877" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/undo_dislike_page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/undo_dislike_page.jsonld new file mode 100755 index 0000000000..4123ebab45 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/undo_dislike_page.jsonld @@ -0,0 +1,23 @@ +{ + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "actor": "http://enterprise.lemmy.ml/u/lemmy_beta", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/post/1", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Like", + "id": "http://enterprise.lemmy.ml/activities/like/2227ab2c-79e2-4fca-a1d2-1d67dacf2457" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Undo", + "id": "http://enterprise.lemmy.ml/activities/undo/6cc6fb71-39fe-49ea-9506-f0423b101e98" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/undo_like_note.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/undo_like_note.jsonld new file mode 100755 index 0000000000..84a6efe50f --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/activities/voting/undo_like_note.jsonld @@ -0,0 +1,23 @@ +{ + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "actor": "http://ds9.lemmy.ml/u/lemmy_alpha", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": "http://ds9.lemmy.ml/comment/1", + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Like", + "id": "http://ds9.lemmy.ml/activities/like/efcf7ae2-dfcc-4ff4-9ce4-6adf251ff004" + }, + "cc": [ + "http://enterprise.lemmy.ml/c/main" + ], + "type": "Undo", + "id": "http://ds9.lemmy.ml/activities/undo/3518565c-24a7-4d9e-8e0a-f7a2f45ac618" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_followers.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_followers.jsonld new file mode 100755 index 0000000000..a2b03ab17f --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_followers.jsonld @@ -0,0 +1,6 @@ +{ + "id": "http://enterprise.lemmy.ml/c/main/followers", + "type": "Collection", + "totalItems": 3, + "items": [] +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_moderators.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_moderators.jsonld new file mode 100755 index 0000000000..eccd0dad73 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_moderators.jsonld @@ -0,0 +1,7 @@ +{ + "type": "OrderedCollection", + "id": "https://enterprise.lemmy.ml/c/tenforward/moderators", + "orderedItems": [ + "https://enterprise.lemmy.ml/u/picard" + ] +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_outbox.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_outbox.jsonld new file mode 100755 index 0000000000..147891771f --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/collections/group_outbox.jsonld @@ -0,0 +1,61 @@ +{ + "type": "OrderedCollection", + "id": "https://ds9.lemmy.ml/c/testcom/outbox", + "totalItems": 2, + "orderedItems": [ + { + "actor": "https://ds9.lemmy.ml/c/testcom", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "type": "Page", + "id": "https://ds9.lemmy.ml/post/2328", + "attributedTo": "https://ds9.lemmy.ml/u/nutomic", + "to": [ + "https://ds9.lemmy.ml/c/testcom", + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [], + "name": "another outbox test", + "mediaType": "text/html", + "commentsEnabled": true, + "sensitive": false, + "stickied": false, + "published": "2021-11-18T17:19:45.895163+00:00" + }, + "cc": [ + "https://ds9.lemmy.ml/c/testcom/followers" + ], + "type": "Announce", + "id": "https://ds9.lemmy.ml/activities/announce/b204fe9f-b13d-4af2-9d22-239ac2d892e6" + }, + { + "actor": "https://ds9.lemmy.ml/c/testcom", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "type": "Page", + "id": "https://ds9.lemmy.ml/post/2327", + "attributedTo": "https://ds9.lemmy.ml/u/nutomic", + "to": [ + "https://ds9.lemmy.ml/c/testcom", + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [], + "name": "outbox test", + "mediaType": "text/html", + "commentsEnabled": true, + "sensitive": false, + "stickied": false, + "published": "2021-11-18T17:19:05.763109+00:00" + }, + "cc": [ + "https://ds9.lemmy.ml/c/testcom/followers" + ], + "type": "Announce", + "id": "https://ds9.lemmy.ml/activities/announce/c6c960ce-c8d8-4231-925e-3ba367468f18" + } + ] +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/collections/person_outbox.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/collections/person_outbox.jsonld new file mode 100755 index 0000000000..8da5610234 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/collections/person_outbox.jsonld @@ -0,0 +1,6 @@ +{ + "type": "OrderedCollection", + "id": "http://ds9.lemmy.ml/u/lemmy_alpha/outbox", + "orderedItems": [], + "totalItems": 0 +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/context.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/context.jsonld new file mode 100755 index 0000000000..88f3a65868 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/context.jsonld @@ -0,0 +1,19 @@ +[ + "https://www.w3.org/ns/activitystreams", + { + "stickied": "as:stickied", + "pt": "https://join-lemmy.org#", + "sc": "http://schema.org#", + "matrixUserId": { + "type": "sc:Text", + "id": "as:alsoKnownAs" + }, + "sensitive": "as:sensitive", + "comments_enabled": { + "type": "sc:Boolean", + "id": "pt:commentsEnabled" + }, + "moderators": "as:moderators" + }, + "https://w3id.org/security/v1" +] \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/objects/chat_message.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/objects/chat_message.jsonld new file mode 100755 index 0000000000..c639aef92a --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/objects/chat_message.jsonld @@ -0,0 +1,15 @@ +{ + "id": "https://enterprise.lemmy.ml/private_message/1621", + "type": "ChatMessage", + "attributedTo": "https://enterprise.lemmy.ml/u/picard", + "to": [ + "https://queer.hacktivis.me/users/lanodan" + ], + "content": "

Hello hello, testing

\n", + "mediaType": "text/html", + "source": { + "content": "Hello hello, testing", + "mediaType": "text/markdown" + }, + "published": "2021-10-21T10:13:14.597721+00:00" +} diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/objects/group.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/objects/group.jsonld new file mode 100755 index 0000000000..7eddd86bdf --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/objects/group.jsonld @@ -0,0 +1,34 @@ +{ + "id": "https://enterprise.lemmy.ml/c/tenforward", + "type": "Group", + "preferredUsername": "main", + "name": "Ten Forward", + "summary": "

Lounge and recreation facility

\n
\n

Welcome to the Enterprise!.

\n", + "source": { + "content": "Lounge and recreation facility\n\n---\n\nWelcome to the [Enterprise](https://memory-alpha.fandom.com/wiki/USS_Enterprise_(NCC-1701-D))!.", + "mediaType": "text/markdown" + }, + "sensitive": false, + "icon": { + "type": "Image", + "url": "https://enterprise.lemmy.ml/pictrs/image/waqyZwLAy4.webp" + }, + "image": { + "type": "Image", + "url": "https://enterprise.lemmy.ml/pictrs/image/Wt8zoMcCmE.jpg" + }, + "inbox": "https://enterprise.lemmy.ml/c/tenforward/inbox", + "followers": "https://enterprise.lemmy.ml/c/tenforward/followers", + "moderators": "https://enterprise.lemmy.ml/c/tenforward/moderators", + "endpoints": { + "sharedInbox": "https://enterprise.lemmy.ml/inbox" + }, + "outbox": "https://enterprise.lemmy.ml/c/tenforward/outbox", + "publicKey": { + "id": "https://enterprise.lemmy.ml/c/tenforward#main-key", + "owner": "https://enterprise.lemmy.ml/c/tenforward", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzRjKTNtvDCmugplwEh+g\nx1bhKm6BHUZfXfpscgMMm7tXFswSDzUQirMgfkxa9ubfr1PDFKffA2vQ9x6CyuO/\n70xTafdOHyV1tSqzgKz0ZvFZ/VCOo6qy1mYWVkrtBm/fKzM+87MdkKYB/zI4VyEJ\nLfLQgjwxBAEYUH3CBG71U0gO0TwbimWNN0vqlfp0QfThNe1WYObF88ZVzMLgFbr7\nRHBItZjlZ/d8foPDidlIR3l2dJjy0EsD8F9JM340jtX7LXqFmU4j1AQKNHTDLnUF\nwYVhzuQGNJ504l5LZkFG54XfIFT7dx2QwuuM9bSnfPv/98RYrq1Si6tCkxEt1cVe\n4wIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "published": "2019-06-02T16:43:50.799554+00:00", + "updated": "2021-03-10T17:18:10.498868+00:00" +} diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/objects/instance.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/objects/instance.jsonld new file mode 100755 index 0000000000..524055f33d --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/objects/instance.jsonld @@ -0,0 +1,20 @@ +{ + "type": "Service", + "id": "https://enterprise.lemmy.ml/", + "name": "Enterprise", + "summary": "A test instance", + "content": "

Enterprise sidebar

\\n", + "mediaType": "text/html", + "source": { + "content": "Enterprise sidebar", + "mediaType": "text/markdown" + }, + "inbox": "https://enterprise.lemmy.ml/inbox", + "outbox": "https://enterprise.lemmy.ml/outbox", + "publicKey": { + "id": "https://enterprise.lemmy.ml/#main-key", + "owner": "https://enterprise.lemmy.ml/", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAupcK0xTw5yQb/fnztAmb\n9LfPbhJJP1+1GwUaOXGYiDJD6uYJhl9CLmgztLl3RyV9ltOYoN8/NLNDfOMmgOjd\nrsNWEjDI9IcVPmiZnhU7hsi6KgQvJzzv8O5/xYjAGhDfrGmtdpL+lyG0B5fQod8J\n/V5VWvTQ0B0qFrLSBBuhOrp8/fTtDskdtElDPtnNfH2jn6FgtLOijidWwf9ekFo4\n0I1JeuEw6LuD/CzKVJTPoztzabUV1DQF/DnFJm+8y7SCJa9jEO56Uf9eVfa1jF6f\ndH6ZvNJMiafstVuLMAw7C/eNJy3ufXgtZ4403oOKA0aRSYf1cc9pHSZ9gDE/mevH\nLwIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "published": "2022-01-19T21:52:11.110741+00:00" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/objects/note.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/objects/note.jsonld new file mode 100755 index 0000000000..269063a769 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/objects/note.jsonld @@ -0,0 +1,26 @@ +{ + "id": "https://enterprise.lemmy.ml/comment/38741", + "type": "Note", + "attributedTo": "https://enterprise.lemmy.ml/u/picard", + "to": ["https://www.w3.org/ns/activitystreams#Public"], + "cc": [ + "https://enterprise.lemmy.ml/c/tenforward", + "https://enterprise.lemmy.ml/u/picard" + ], + "inReplyTo": "https://enterprise.lemmy.ml/post/55143", + "content": "

first comment!

\n", + "mediaType": "text/html", + "source": { + "content": "first comment!", + "mediaType": "text/markdown" + }, + "tag": [ + { + "href": "https://enterprise.lemmy.ml/u/picard", + "type": "Mention", + "name": "@picard@enterprise.lemmy.ml" + } + ], + "published": "2021-03-01T13:42:43.966208+00:00", + "updated": "2021-03-01T13:43:03.955787+00:00" +} diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/objects/page.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/objects/page.jsonld new file mode 100755 index 0000000000..36cac596f5 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/objects/page.jsonld @@ -0,0 +1,25 @@ +{ + "id": "https://enterprise.lemmy.ml/post/55143", + "type": "Page", + "attributedTo": "https://enterprise.lemmy.ml/u/picard", + "to": [ + "https://enterprise.lemmy.ml/c/tenforward", + "https://www.w3.org/ns/activitystreams#Public" + ], + "name": "Post title", + "content": "

This is a post in the /c/tenforward community

\n", + "mediaType": "text/html", + "source": { + "content": "This is a post in the /c/tenforward community", + "mediaType": "text/markdown" + }, + "url": "https://enterprise.lemmy.ml/pictrs/image/eOtYb9iEiB.png", + "image": { + "type": "Image", + "url": "https://enterprise.lemmy.ml/pictrs/image/eOtYb9iEiB.png" + }, + "sensitive": false, + "commentsEnabled": true, + "stickied": true, + "published": "2021-02-26T12:35:34.292626+00:00" +} diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/objects/person.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/objects/person.jsonld new file mode 100755 index 0000000000..4f708656ca --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/objects/person.jsonld @@ -0,0 +1,32 @@ +{ + "id": "https://enterprise.lemmy.ml/u/picard", + "type": "Person", + "preferredUsername": "picard", + "name": "Jean-Luc Picard", + "summary": "

Captain of the starship Enterprise.

\n", + "source": { + "content": "Captain of the starship **Enterprise**.", + "mediaType": "text/markdown" + }, + "icon": { + "type": "Image", + "url": "https://enterprise.lemmy.ml/pictrs/image/ed9ej7.jpg" + }, + "image": { + "type": "Image", + "url": "https://enterprise.lemmy.ml/pictrs/image/XenaYI5hTn.png" + }, + "matrixUserId": "@picard:matrix.org", + "inbox": "https://enterprise.lemmy.ml/u/picard/inbox", + "outbox": "https://enterprise.lemmy.ml/u/picard/outbox", + "endpoints": { + "sharedInbox": "https://enterprise.lemmy.ml/inbox" + }, + "published": "2020-01-17T01:38:22.348392+00:00", + "updated": "2021-08-13T00:11:15.941990+00:00", + "publicKey": { + "id": "https://enterprise.lemmy.ml/u/picard#main-key", + "owner": "https://enterprise.lemmy.ml/u/picard", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0lP99/s5Vv+XbPdkeqIJ\nwoD4GFnHmBnBHdEKChEUWfWj1TtioC/rGNoXFQeXQA3Amhy4nxSceiDnUgwkkuQY\nv0MtIW58NzgknEavtllxL+LSds5pg3gANaDIk8UiWTkqXTg0GnlJMpCK1Chen0l/\nszL6DEvUyTSuS5ZYDXFgewF89Pe7U0S15V5U2Harv7AgJYDyxmUL0D1pGuUCRqcE\nl5MTHJjrXeNnH1w2g8aly8YlO/Cr0L51rFg/lBF23vni7ZLv8HbmWh6YpaAf1R8h\nE45zKR7OHqymdjzrg1ITBwovefpwMkVgnJ+Wdr4HPnFlBSkXPoZeM11+Z8L0anzA\nXwIDAQAB\n-----END PUBLIC KEY-----\n" + } +} diff --git a/plugins/ActivityPub/tests/fixtures/lemmy/objects/tombstone.jsonld b/plugins/ActivityPub/tests/fixtures/lemmy/objects/tombstone.jsonld new file mode 100755 index 0000000000..e2dc8cc6fa --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lemmy/objects/tombstone.jsonld @@ -0,0 +1,4 @@ +{ + "id": "https://lemmy.ml/comment/110273", + "type": "Tombstone" +} diff --git a/plugins/ActivityPub/tests/fixtures/lotide/activities/create_note_reply.jsonld b/plugins/ActivityPub/tests/fixtures/lotide/activities/create_note_reply.jsonld new file mode 100755 index 0000000000..b6b2a13fae --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lotide/activities/create_note_reply.jsonld @@ -0,0 +1,30 @@ +{ + "actor": "https://c.tide.tk/users/1", + "object": { + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://c.tide.tk/comments/52", + "type": "Note", + "mediaType": "text/html", + "source": { + "content": "test comment", + "mediaType": "text/markdown" + }, + "attributedTo": "https://c.tide.tk/users/1", + "content": "

test comment

\n", + "published": "2021-09-16T01:20:27.558063+00:00", + "inReplyTo": "https://c.tide.tk/posts/51", + "to": "https://c.tide.tk/users/1", + "cc": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://c.tide.tk/communities/1" + ] + }, + "to": "https://c.tide.tk/users/1", + "cc": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://c.tide.tk/communities/1" + ], + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://c.tide.tk/comments/52/create", + "type": "Create" +} diff --git a/plugins/ActivityPub/tests/fixtures/lotide/activities/create_page.jsonld b/plugins/ActivityPub/tests/fixtures/lotide/activities/create_page.jsonld new file mode 100755 index 0000000000..d39e425530 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lotide/activities/create_page.jsonld @@ -0,0 +1,20 @@ +{ + "actor": "https://b.tide.tk/apub/users/1", + "object": { + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://b.tide.tk/apub/posts/60", + "type": "Page", + "name": "test post from b", + "summary": "test post from b", + "to": "https://c.tide.tk/communities/1", + "cc": "https://www.w3.org/ns/activitystreams#Public", + "published": "2020-12-19T19:20:26.941381+00:00", + "attributedTo": "https://b.tide.tk/apub/users/1", + "url": "https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake.html" + }, + "to": "https://c.tide.tk/communities/1", + "cc": "https://www.w3.org/ns/activitystreams#Public", + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://b.tide.tk/apub/posts/60/create", + "type": "Create" +} diff --git a/plugins/ActivityPub/tests/fixtures/lotide/activities/delete_note.jsonld b/plugins/ActivityPub/tests/fixtures/lotide/activities/delete_note.jsonld new file mode 100755 index 0000000000..1cd4491570 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lotide/activities/delete_note.jsonld @@ -0,0 +1,7 @@ +{ + "actor": "https://narwhal.city/users/3", + "object": "https://narwhal.city/posts/12", + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://narwhal.city/posts/12/delete", + "type": "Delete" +} diff --git a/plugins/ActivityPub/tests/fixtures/lotide/objects/group.jsonld b/plugins/ActivityPub/tests/fixtures/lotide/objects/group.jsonld new file mode 100755 index 0000000000..fa3dadd85f --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lotide/objects/group.jsonld @@ -0,0 +1,28 @@ +{ + "publicKey": { + "id": "https://narwhal.city//communities/12#main-key", + "owner": "https://narwhal.city/communities/12", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtktBbjovDSQmjZo1SIGK\n1TP1FKuIj8JlFgY6iGrAA5IBUN8PPKRzvo0U0FDvF+7SsUx+yiY0JrU1KzWcJxRr\nCfTrjNzaKeMS4E6ZU9czf8D157JUJQtkgikObxwU84eY5K+jic1ZgGv2eX77E6f/\nBZFO8StdS73g8a1vxPEsJVBn/VEVdsD9fg3uvhwFN7UrUKoKGf+1h2PajeX1aPZb\ntD3ql3Xff2IZFZu6Euj80OezozQ6/AqZx+qW6HfjvSf30C8ZGYU1PSF6MczY+Sg6\n6nyPMfmbKykYgWqfRMZ/NKaldsIjN8nMRDCfHASt6+pNmZgWh9HvSaFiSFKIn3Xj\nXwIDAQAB\n-----END PUBLIC KEY-----\n", + "signatureAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" + }, + "featured": "https://narwhal.city/communities/12/featured", + "inbox": "https://narwhal.city/communities/12/inbox", + "outbox": "https://narwhal.city/communities/12/outbox", + "followers": "https://narwhal.city/communities/12/followers", + "preferredUsername": "Iotide", + "summary": "This is for talking about lotide\r\n\r\n\r\nI accidentally called it iotide because I misread the text when I made it lol", + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + { + "featured": { + "@id": "toot:featured", + "@type": "@id" + }, + "toot": "http://joinmastodon.org/ns#" + } + ], + "id": "https://narwhal.city/communities/12", + "type": "Group", + "name": "Iotide" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lotide/objects/note.jsonld b/plugins/ActivityPub/tests/fixtures/lotide/objects/note.jsonld new file mode 100755 index 0000000000..4744607358 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lotide/objects/note.jsonld @@ -0,0 +1,19 @@ +{ + "source": { + "mediaType": "text/markdown", + "content": "ed: now featuring Bob Dylan and RNG" + }, + "attributedTo": "https://narwhal.city/users/3", + "content": "

ed: now featuring Bob Dylan and RNG

\n", + "@context": "https://www.w3.org/ns/activitystreams", + "inReplyTo": "https://narwhal.city/posts/9", + "to": "https://narwhal.city/users/1", + "cc": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://narwhal.city/communities/4" + ], + "id": "https://narwhal.city/comments/3", + "type": "Note", + "mediaType": "text/html", + "published": "2020-12-31T06:47:24.470801+00:00" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/lotide/objects/page.jsonld b/plugins/ActivityPub/tests/fixtures/lotide/objects/page.jsonld new file mode 100755 index 0000000000..b892eba6e7 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lotide/objects/page.jsonld @@ -0,0 +1,12 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://narwhal.city/posts/9", + "type": "Page", + "name": "What's Dylan Grillin'? (reupload)", + "to": "https://narwhal.city/communities/4", + "attributedTo": "https://narwhal.city/users/1", + "published": "2020-12-30T07:29:19.460932+00:00", + "url": "https://www.youtube.com/watch?v=ZI4LGTXscR4", + "summary": "What's Dylan Grillin'? (reupload)", + "cc": "https://www.w3.org/ns/activitystreams#Public" +} diff --git a/plugins/ActivityPub/tests/fixtures/lotide/objects/person.jsonld b/plugins/ActivityPub/tests/fixtures/lotide/objects/person.jsonld new file mode 100755 index 0000000000..5f3218e285 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lotide/objects/person.jsonld @@ -0,0 +1,22 @@ +{ + "publicKey": { + "id": "https://narwhal.city//users/3#main-key", + "owner": "https://narwhal.city/users/3", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvC+ZURasjlyX1o4FqMWB\npAppKWU2zPV7cUokKsnKo9m2PKw+53mmVUMQ66LtN80l/WCK/hy7r2lDKvpyt3YO\nnEsNcSCYLaYnTLDNkE2u14kx8jKOFiyRKKVKCNA32b+XvM+rLDmfaNOeBsB92mVR\nVmIz+WO+0FVPtg1MQMKWIoe6SgKW8SHpz/qVeggYNMKp/b2ai7Of0KTSbYIcqFR2\nT8g/6L5Mmjz4zKIn+a5GFmBNTMTCsJTxa5yOjPwefh/9SrukWt01N5KLrIpmApms\nRoJSsBWh0xo7N+v23PaFHEkaJ2zCtT5zkzITa8bUfHoIc3rM6Ipa1uFlnmrnUIZE\nUQIDAQAB\n-----END PUBLIC KEY-----\n", + "signatureAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" + }, + "inbox": "https://narwhal.city/users/3/inbox", + "outbox": "https://narwhal.city/users/3/outbox", + "preferredUsername": "57H", + "endpoints": { + "sharedInbox": "https://narwhal.city/inbox" + }, + "summary": "", + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1" + ], + "id": "https://narwhal.city/users/3", + "type": "Person", + "name": "57H" +} diff --git a/plugins/ActivityPub/tests/fixtures/lotide/objects/tombstone.jsonld b/plugins/ActivityPub/tests/fixtures/lotide/objects/tombstone.jsonld new file mode 100755 index 0000000000..def00e6e6b --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/lotide/objects/tombstone.jsonld @@ -0,0 +1,6 @@ +{ + "former_type": "Note", + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://narwhal.city/posts/12", + "type": "Tombstone" +} diff --git a/plugins/ActivityPub/tests/fixtures/mastodon/activities/create_note.jsonld b/plugins/ActivityPub/tests/fixtures/mastodon/activities/create_note.jsonld new file mode 100755 index 0000000000..d796a043eb --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/mastodon/activities/create_note.jsonld @@ -0,0 +1,62 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "ostatus": "http://ostatus.org#", + "atomUri": "ostatus:atomUri" + } + ], + "id": "https://mastodon.madrid/users/felix/statuses/107224289116410645/activity", + "type": "Create", + "actor": "https://mastodon.madrid/users/felix", + "published": "2021-11-05T11:46:50Z", + "to": [ + "https://mastodon.madrid/users/felix/followers" + ], + "cc": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://mamot.fr/users/retiolus" + ], + "object": { + "id": "https://mastodon.madrid/users/felix/statuses/107224289116410645", + "type": "Note", + "summary": null, + "inReplyTo": "https://mamot.fr/users/retiolus/statuses/107224244380204526", + "published": "2021-11-05T11:46:50Z", + "url": "https://mastodon.madrid/@felix/107224289116410645", + "attributedTo": "https://mastodon.madrid/users/felix", + "to": [ + "https://mastodon.madrid/users/felix/followers" + ], + "cc": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://mamot.fr/users/retiolus" + ], + "sensitive": false, + "atomUri": "https://mastodon.madrid/users/felix/statuses/107224289116410645", + "inReplyToAtomUri": "https://mamot.fr/users/retiolus/statuses/107224244380204526", + "conversation": "tag:mamot.fr,2021-11-05:objectId=64635960:objectType=Conversation", + "content": "

@retiolus i have never been disappointed by a thinkpad. if you want to save money, get a model from a few years ago, there isnt a huge difference anyway.

", + "contentMap": { + "en": "

@retiolus i have neverbeendisappointed by a thinkpad. if you want to save money, get a model from a few years ago, there isnt a huge difference anyway.

" + }, + "attachment": [], + "tag": [ + { + "type": "Mention", + "href": "https://mamot.fr/users/retiolus", + "name": "@retiolus@mamot.fr" + } + ], + "replies": { + "id": "https://mastodon.madrid/users/felix/statuses/107224289116410645/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://mastodon.madrid/users/felix/statuses/107224289116410645/replies?only_other_accounts=true&page=true", + "partOf": "https://mastodon.madrid/users/felix/statuses/107224289116410645/replies", + "items": [] + } + } + } +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/mastodon/activities/delete.jsonld b/plugins/ActivityPub/tests/fixtures/mastodon/activities/delete.jsonld new file mode 100755 index 0000000000..dec21ca480 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/mastodon/activities/delete.jsonld @@ -0,0 +1,26 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "ostatus": "http://ostatus.org#", + "atomUri": "ostatus:atomUri" + } + ], + "id": "https://mastodon.madrid/users/felix/statuses/107773559874184870#delete", + "type": "Delete", + "actor": "https://mastodon.madrid/users/felix", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "object": { + "id": "https://mastodon.madrid/users/felix/statuses/107773559874184870", + "type": "Tombstone", + "atomUri": "https://mastodon.madrid/users/felix/statuses/107773559874184870" + }, + "signature": { + "type": "RsaSignature2017", + "creator": "https://mastodon.madrid/users/felix#main-key", + "created": "2022-02-10T11:54:18Z", + "signatureValue": "NjGnbkvouSP/cSusR7+sz39iEYxWXCu6nFmBXU3t8ETPkmbpMF5ASeJixXvpTOqbOfkMoWfXncw+jDsbqZ3ELaHGG1gZ5wHWym7mk7YCjQokpF3oPhTWmlEJCVKgewXMrfI4Ok8GGsUMGzuki9EyBDGc/UNBMEAhcxV5Huu7QSQDowcbIwxS3ImxFmtKFceh6mv/kMiXUerCgkYSm6rYZeXZGMTUpvcn9gP6X6Ed6UsrLjCSb3Fj0Naz7LHtzZXRSZDZF/SX2Vw/xKJIgEGzSCv+LKZGvEEkK8PPfMJJhi8cBJebkqOnBGtE6gYK2z2cm/oGorZtXU2L05pXmLAlYQ==" + } +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/mastodon/activities/follow.jsonld b/plugins/ActivityPub/tests/fixtures/mastodon/activities/follow.jsonld new file mode 100755 index 0000000000..2381ed521b --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/mastodon/activities/follow.jsonld @@ -0,0 +1,7 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://masto.asonix.dog/1ea87517-63c5-4118-8831-460ee641b2cf", + "type": "Follow", + "actor": "https://masto.asonix.dog/users/asonix", + "object": "https://ds9.lemmy.ml/c/testcom" +} diff --git a/plugins/ActivityPub/tests/fixtures/mastodon/activities/undo_follow.jsonld b/plugins/ActivityPub/tests/fixtures/mastodon/activities/undo_follow.jsonld new file mode 100755 index 0000000000..d47ecd886f --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/mastodon/activities/undo_follow.jsonld @@ -0,0 +1,13 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://masto.asonix.dog/users/asonix#follows/449/undo", + "type": "Undo", + "actor": "https://masto.asonix.dog/users/asonix", + "object": { + "id": "https://masto.asonix.dog/1ea87517-63c5-4118-8831-460ee641b2cf", + "type": "Follow", + "actor": "https://masto.asonix.dog/users/asonix", + "object": "https://ds9.lemmy.ml/c/testcom" + } +} + diff --git a/plugins/ActivityPub/tests/fixtures/mastodon/objects/note.jsonld b/plugins/ActivityPub/tests/fixtures/mastodon/objects/note.jsonld new file mode 100755 index 0000000000..176b403570 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/mastodon/objects/note.jsonld @@ -0,0 +1,54 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "ostatus": "http://ostatus.org#", + "atomUri": "ostatus:atomUri", + "inReplyToAtomUri": "ostatus:inReplyToAtomUri", + "conversation": "ostatus:conversation", + "sensitive": "as:sensitive", + "toot": "http://joinmastodon.org/ns#", + "votersCount": "toot:votersCount" + } + ], + "id": "https://mastodon.madrid/users/felix/statuses/107224289116410645", + "type": "Note", + "summary": null, + "inReplyTo": "https://mamot.fr/users/retiolus/statuses/107224244380204526", + "published": "2021-11-05T11:46:50Z", + "url": "https://mastodon.madrid/@felix/107224289116410645", + "attributedTo": "https://mastodon.madrid/users/felix", + "to": [ + "https://mastodon.madrid/users/felix/followers" + ], + "cc": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://mamot.fr/users/retiolus" + ], + "sensitive": false, + "atomUri": "https://mastodon.madrid/users/felix/statuses/107224289116410645", + "inReplyToAtomUri": "https://mamot.fr/users/retiolus/statuses/107224244380204526", + "conversation": "tag:mamot.fr,2021-11-05:objectId=64635960:objectType=Conversation", + "content": "

@retiolus i have never been disappointed by a thinkpad. if you want to save money, get a model from a few years ago, there isnt a huge difference anyway.

", + "contentMap": { + "en": "

@retiolus i have never been disappointed by a thinkpad. if you want to save money, get a model from a few years ago, there isnt a huge difference anyway.

" + }, + "attachment": [], + "tag": [ + { + "type": "Mention", + "href": "https://mamot.fr/users/retiolus", + "name": "@retiolus@mamot.fr" + } + ], + "replies": { + "id": "https://mastodon.madrid/users/felix/statuses/107224289116410645/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://mastodon.madrid/users/felix/statuses/107224289116410645/replies?only_other_accounts=true&page=true", + "partOf": "https://mastodon.madrid/users/felix/statuses/107224289116410645/replies", + "items": [] + } + } +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/mastodon/objects/person.jsonld b/plugins/ActivityPub/tests/fixtures/mastodon/objects/person.jsonld new file mode 100755 index 0000000000..0ae4e7fa23 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/mastodon/objects/person.jsonld @@ -0,0 +1,93 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + { + "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", + "toot": "http://joinmastodon.org/ns#", + "featured": { + "@id": "toot:featured", + "@type": "@id" + }, + "alsoKnownAs": { + "@id": "as:alsoKnownAs", + "@type": "@id" + }, + "movedTo": { + "@id": "as:movedTo", + "@type": "@id" + }, + "schema": "http://schema.org#", + "PropertyValue": "schema:PropertyValue", + "value": "schema:value", + "IdentityProof": "toot:IdentityProof", + "discoverable": "toot:discoverable", + "Device": "toot:Device", + "Ed25519Signature": "toot:Ed25519Signature", + "Ed25519Key": "toot:Ed25519Key", + "Curve25519Key": "toot:Curve25519Key", + "EncryptedMessage": "toot:EncryptedMessage", + "publicKeyBase64": "toot:publicKeyBase64", + "deviceId": "toot:deviceId", + "claim": { + "@type": "@id", + "@id": "toot:claim" + }, + "fingerprintKey": { + "@type": "@id", + "@id": "toot:fingerprintKey" + }, + "identityKey": { + "@type": "@id", + "@id": "toot:identityKey" + }, + "devices": { + "@type": "@id", + "@id": "toot:devices" + }, + "messageFranking": "toot:messageFranking", + "messageType": "toot:messageType", + "cipherText": "toot:cipherText", + "Hashtag": "as:Hashtag", + "focalPoint": { + "@container": "@list", + "@id": "toot:focalPoint" + } + } + ], + "id": "https://mastodon.madrid/users/felix", + "type": "Person", + "following": "https://mastodon.madrid/users/felix/following", + "followers": "https://mastodon.madrid/users/felix/followers", + "inbox": "https://mastodon.madrid/users/felix/inbox", + "outbox": "https://mastodon.madrid/users/felix/outbox", + "featured": "https://mastodon.madrid/users/felix/collections/featured", + "preferredUsername": "felix", + "name": "", + "summary": "

#Lemmy Maintainer

", + "url": "https://mastodon.madrid/@felix", + "manuallyApprovesFollowers": false, + "discoverable": false, + "devices": "https://mastodon.madrid/users/felix/collections/devices", + "publicKey": { + "id": "https://mastodon.madrid/users/felix#main-key", + "owner": "https://mastodon.madrid/users/felix", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzc+evQS6XHTUdniPmFfH\n0U6aa4NaGSTQY4fmJna9w9Sr/8nNN4XWbGJLD4kawPxAXMbK63RMkkxvaHI9w+Oe\nd6oIJH2Z5qH4s2eX8f610SGDvyEZltLAY8TkMhNEp+3bOCKf1zG/uCsE7uC6Mjal\nd6KYyqoom5TwO2UWH5r6l3vyLFvnXWX2zOgSWJwLNLxMWkkd9AqM7k9+pgmeaNWD\n6JvG7Na5ywsR4CZrE5PjgtiC9LWP/H3Elgb2nIzye5HUEJuK2h1+eNFP3HSK5CF3\ncrg4DsZ1n5X3fQVm5YmFUYtEMLZL5S18dFsp6uwE0TmVOODJdnJ6+cgu0/8t2ROR\nJQIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "tag": [ + { + "type": "Hashtag", + "href": "https://mastodon.madrid/explore/lemmy", + "name": "#lemmy" + } + ], + "attachment": [], + "endpoints": { + "sharedInbox": "https://mastodon.madrid/inbox" + }, + "icon": { + "type": "Image", + "mediaType": "image/jpeg", + "url": "https://mastodon.madrid/system/accounts/avatars/000/087/969/original/ffdd1c832b453bc9.jpg?1598972149" + } +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/pleroma/activities/create_note.jsonld b/plugins/ActivityPub/tests/fixtures/pleroma/activities/create_note.jsonld new file mode 100755 index 0000000000..55594ced03 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/pleroma/activities/create_note.jsonld @@ -0,0 +1,52 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://greenish.red/schemas/litepub-0.1.jsonld", + { + "@language": "und" + } + ], + "actor": "https://greenish.red/users/nutomic", + "cc": [ + "https://greenish.red/users/nutomic/followers" + ], + "context": "https://greenish.red/contexts/f6244742-0526-4b84-ac4f-ceadf1fb4e56", + "context_id": 6336544, + "directMessage": false, + "id": "https://greenish.red/activities/db61d52b-9c35-486a-bf27-bbd4edc6c6a1", + "object": { + "actor": "https://greenish.red/users/nutomic", + "attachment": [], + "attributedTo": "https://greenish.red/users/nutomic", + "cc": [ + "https://greenish.red/users/nutomic/followers" + ], + "content": "@lanodan test", + "context": "https://greenish.red/contexts/f6244742-0526-4b84-ac4f-ceadf1fb4e56", + "conversation": "https://greenish.red/contexts/f6244742-0526-4b84-ac4f-ceadf1fb4e56", + "id": "https://greenish.red/objects/1a522f2e-d5ab-454b-93d7-e58bc0650c2a", + "inReplyTo": "https://enterprise.lemmy.ml/post/55143", + "published": "2021-10-26T10:28:35.602455Z", + "sensitive": false, + "source": "@lanodan@ds9.lemmy.ml test", + "summary": "", + "tag": [ + { + "href": "https://enterprise.lemmy.ml/u/picard", + "name": "@lanodan@ds9.lemmy.ml", + "type": "Mention" + } + ], + "to": [ + "https://enterprise.lemmy.ml/u/picard", + "https://www.w3.org/ns/activitystreams#Public" + ], + "type": "Note" + }, + "published": "2021-10-26T10:28:35.595650Z", + "to": [ + "https://enterprise.lemmy.ml/u/picard", + "https://www.w3.org/ns/activitystreams#Public" + ], + "type": "Create" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/pleroma/activities/delete.jsonld b/plugins/ActivityPub/tests/fixtures/pleroma/activities/delete.jsonld new file mode 100755 index 0000000000..b5aa08ef99 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/pleroma/activities/delete.jsonld @@ -0,0 +1,35 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://greenish.red/schemas/litepub-0.1.jsonld", + { + "@language": "und" + } + ], + "actor": "https://greenish.red/users/vpzom", + "attachment": [], + "attributedTo": "https://greenish.red/users/vpzom", + "cc": [], + "conversation": null, + "id": "https://greenish.red/activities/52f0b259-596e-429f-8a1b-c0b455f8932b", + "object": "https://greenish.red/objects/38e2b983-ebf5-4387-9bc2-3b80305469c9", + "tag": [ + { + "href": "https://voyager.lemmy.ml/c/main", + "name": "@main@voyager.lemmy.ml", + "type": "Mention" + }, + { + "href": "https://voyager.lemmy.ml/u/dess_voy_41u2", + "name": "@dess_voy_41u2@voyager.lemmy.ml", + "type": "Mention" + } + ], + "to": [ + "https://greenish.red/users/vpzom/followers", + "https://voyager.lemmy.ml/c/main", + "https://voyager.lemmy.ml/u/dess_voy_41u2", + "https://www.w3.org/ns/activitystreams#Public" + ], + "type": "Delete" +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/pleroma/activities/follow.jsonld b/plugins/ActivityPub/tests/fixtures/pleroma/activities/follow.jsonld new file mode 100755 index 0000000000..8d0f008a83 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/pleroma/activities/follow.jsonld @@ -0,0 +1,18 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://mycrowd.ca/schemas/litepub-0.1.jsonld", + { + "@language": "und" + } + ], + "actor": "https://mycrowd.ca/users/kinetix", + "cc": [], + "id": "https://mycrowd.ca/activities/dab6a4d3-0db0-41ee-8aab-7bfa4929b4fd", + "object": "https://lemmy.ca/u/kinetix", + "state": "pending", + "to": [ + "https://lemmy.ca/u/kinetix" + ], + "type": "Follow" +} diff --git a/plugins/ActivityPub/tests/fixtures/pleroma/objects/chat_message.jsonld b/plugins/ActivityPub/tests/fixtures/pleroma/objects/chat_message.jsonld new file mode 100755 index 0000000000..e4b987d703 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/pleroma/objects/chat_message.jsonld @@ -0,0 +1,17 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://queer.hacktivis.me/schemas/litepub-0.1.jsonld", + { + "@language": "und" + } + ], + "attributedTo": "https://queer.hacktivis.me/users/lanodan", + "content": "Hi!", + "id": "https://queer.hacktivis.me/objects/2", + "published": "2020-02-12T14:08:20Z", + "to": [ + "https://enterprise.lemmy.ml/u/picard" + ], + "type": "ChatMessage" +} diff --git a/plugins/ActivityPub/tests/fixtures/pleroma/objects/note.jsonld b/plugins/ActivityPub/tests/fixtures/pleroma/objects/note.jsonld new file mode 100755 index 0000000000..61b636309e --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/pleroma/objects/note.jsonld @@ -0,0 +1,36 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://queer.hacktivis.me/schemas/litepub-0.1.jsonld", + { + "@language": "und" + } + ], + "actor": "https://queer.hacktivis.me/users/lanodan", + "attachment": [], + "attributedTo": "https://queer.hacktivis.me/users/lanodan", + "cc": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "content": "@popolon Have what?", + "context": "https://queer.hacktivis.me/contexts/34cba3d2-2f35-4169-aeff-56af9bfeb753", + "conversation": "https://queer.hacktivis.me/contexts/34cba3d2-2f35-4169-aeff-56af9bfeb753", + "id": "https://queer.hacktivis.me/objects/8d4973f4-53de-49cd-8c27-df160e16a9c2", + "inReplyTo": "https://enterprise.lemmy.ml/post/55143", + "published": "2021-10-07T18:06:52.555500Z", + "sensitive": null, + "source": "@popolon@pleroma.popolon.org Have what?", + "summary": "", + "tag": [ + { + "href": "https://pleroma.popolon.org/users/popolon", + "name": "@popolon@pleroma.popolon.org", + "type": "Mention" + } + ], + "to": [ + "https://pleroma.popolon.org/users/popolon", + "https://queer.hacktivis.me/users/lanodan/followers" + ], + "type": "Note" +} diff --git a/plugins/ActivityPub/tests/fixtures/pleroma/objects/person.jsonld b/plugins/ActivityPub/tests/fixtures/pleroma/objects/person.jsonld new file mode 100755 index 0000000000..bc9008babf --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/pleroma/objects/person.jsonld @@ -0,0 +1,79 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + "https://queer.hacktivis.me/schemas/litepub-0.1.jsonld", + { + "@language": "und" + } + ], + "alsoKnownAs": [], + "attachment": [], + "capabilities": { + "acceptsChatMessages": true + }, + "discoverable": false, + "endpoints": { + "oauthAuthorizationEndpoint": "https://queer.hacktivis.me/oauth/authorize", + "oauthRegistrationEndpoint": "https://queer.hacktivis.me/api/v1/apps", + "oauthTokenEndpoint": "https://queer.hacktivis.me/oauth/token", + "sharedInbox": "https://queer.hacktivis.me/inbox", + "uploadMedia": "https://queer.hacktivis.me/api/ap/upload_media" + }, + "featured": "https://queer.hacktivis.me/users/lanodan/collections/featured", + "followers": "https://queer.hacktivis.me/users/lanodan/followers", + "following": "https://queer.hacktivis.me/users/lanodan/following", + "icon": { + "type": "Image", + "url": "https://queer.hacktivis.me/media/d23cf9b0-5586-4592-aca5-9a52777a6042/avatar_HD.png" + }, + "id": "https://queer.hacktivis.me/users/lanodan", + "image": { + "type": "Image", + "url": "https://queer.hacktivis.me/media/37b6ce56-8c24-4e64-bd70-a76e84ab0c69/53a48a3a49ed5e5637a84e4f3663df17f8d764244bbc1027ba03cfc446e8b7bd.jpg" + }, + "inbox": "https://queer.hacktivis.me/users/lanodan/inbox", + "manuallyApprovesFollowers": false, + "name": "Haelwenn /элвэн/ :bzh: ", + "outbox": "https://queer.hacktivis.me/users/lanodan/outbox", + "preferredUsername": "lanodan", + "publicKey": { + "id": "https://queer.hacktivis.me/users/lanodan#main-key", + "owner": "https://queer.hacktivis.me/users/lanodan", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsWOgdjSMc010qvxC3njI\nXJlFWMJ5gJ8QXCW/PajYdsHPM6d+jxBNJ6zp9/tIRa2m7bWHTSkuHQ7QthOpt6vu\n+dAWpKRLS607SPLItn/qUcyXvgN+H8shfyhMxvkVs9jXdtlBsLUVE7UNpN0dxzqe\nI79QWbf7o4amgaIWGRYB+OYMnIxKt+GzIkivZdSVSYjfxNnBYkMCeUxm5EpPIxKS\nP5bBHAVRRambD5NUmyKILuC60/rYuc/C+vmgpY2HCWFS2q6o34dPr9enwL6t4b3m\nS1t/EJHk9rGaaDqSGkDEfyQI83/7SDebWKuETMKKFLZi1vMgQIFuOYCIhN6bIiZm\npQIDAQAB\n-----END PUBLIC KEY-----\n\n" + }, + "summary": "---
Website: https://hacktivis.me/
Lang: Français(natif), English(fluent), LSF(🤏~👌), русский (еле-еле),
Politics: Anarchist as in DIY/DIWO, freedom of association, anti-authoritarian, anti-identitarianism

Pronouns: meh, pick any, have fun
Timezone: Let's say Mars, I have a non-24h cycle
```
🦊🦄⚧🂡ⓥ :anarchy: 👿🐧 :gentoo:
Pleroma maintainer (mostly backend)
BadWolf developer
Gentoo contributor

Dayjob: yogoko.fr

That person which uses HJKL in games

Just because computer bad: X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

banner from: https://soc.flyingcube.tech/objects/56f79be2-9013-4559-9826-f7dc392417db
Federation-bots: #nobot", + "tag": [ + { + "icon": { + "type": "Image", + "url": "https://queer.hacktivis.me/emoji/custom/symbols/anarchy.png" + }, + "id": "https://queer.hacktivis.me/emoji/custom/symbols/anarchy.png", + "name": ":anarchy:", + "type": "Emoji", + "updated": "1970-01-01T00:00:00Z" + }, + { + "icon": { + "type": "Image", + "url": "https://queer.hacktivis.me/emoji/custom/mastodon.xyz/bzh.png" + }, + "id": "https://queer.hacktivis.me/emoji/custom/mastodon.xyz/bzh.png", + "name": ":bzh:", + "type": "Emoji", + "updated": "1970-01-01T00:00:00Z" + }, + { + "icon": { + "type": "Image", + "url": "https://queer.hacktivis.me/emoji/custom/gentoo.png" + }, + "id": "https://queer.hacktivis.me/emoji/custom/gentoo.png", + "name": ":gentoo:", + "type": "Emoji", + "updated": "1970-01-01T00:00:00Z" + } + ], + "type": "Person", + "url": "https://queer.hacktivis.me/users/lanodan" +} diff --git a/plugins/ActivityPub/tests/fixtures/smithereen/activities/create_note.jsonld b/plugins/ActivityPub/tests/fixtures/smithereen/activities/create_note.jsonld new file mode 100755 index 0000000000..4bd199d4a8 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/smithereen/activities/create_note.jsonld @@ -0,0 +1,56 @@ +{ + "type": "Create", + "id": "https://friends.grishka.me/posts/66561/activityCreate", + "published": "2021-11-09T11:42:35Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://ds9.lemmy.ml/u/nutomic" + ], + "actor": "https://friends.grishka.me/users/1", + "object": { + "type": "Note", + "id": "https://friends.grishka.me/posts/66561", + "attributedTo": "https://friends.grishka.me/users/1", + "content": "

So does this federate now?

", + "inReplyTo": "https://ds9.lemmy.ml/post/1723", + "published": "2021-11-09T11:42:35Z", + "tag": [ + { + "type": "Mention", + "href": "https://ds9.lemmy.ml/u/nutomic" + } + ], + "url": "https://friends.grishka.me/posts/66561", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://ds9.lemmy.ml/u/nutomic" + ], + "replies": { + "type": "Collection", + "id": "https://friends.grishka.me/posts/66561/replies", + "first": { + "type": "CollectionPage", + "partOf": "https://friends.grishka.me/posts/66561/replies", + "next": "https://friends.grishka.me/posts/66561/replies?page=1" + } + }, + "sensitive": false, + "likes": "https://friends.grishka.me/posts/66561/likes" + }, + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "sensitive": "as:sensitive" + } + ], + "signature": { + "creator": "https://friends.grishka.me/users/1#main-key", + "created": "2021-11-09T11:42:35Z", + "type": "RsaSignature2017", + "signatureValue": "MmEf4hjfwfQbm/W8qfONwf0uEXO4dhKApX8PlodSNi9x6E4kEgBvx7BrKg3gtqnXfU/cbGdVIN/yCz8+v7Tp2T2kj1yRpD7WjbgwzkrOlhxLi3zPXd4En/cVVdZYSfc7R6DGflXOSeOZPnKbrmY6i+1kYkM80Yc+LFtoj0Ftdgc/YbwMynt1OwPvDbB5bJo1NVyRnpNqlqia2VNmdAh1+2vREXZmINsCOFMC5c0RVzEENYMw+ZPsbVdXfoz4wfqK2u2i7SlcDKVErVNPrKn71wfGWRRiLUNupokY1x3jsWeZlPqGvAP3WGS9ChU+FxhnVHbtxIf0QmeOas3okLDSjw==" + } +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/smithereen/objects/note.jsonld b/plugins/ActivityPub/tests/fixtures/smithereen/objects/note.jsonld new file mode 100755 index 0000000000..a8080cae11 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/smithereen/objects/note.jsonld @@ -0,0 +1,38 @@ +{ + "type": "Note", + "id": "https://friends.grishka.me/posts/66561", + "attributedTo": "https://friends.grishka.me/users/1", + "content": "

So does this federate now?

", + "inReplyTo": "https://ds9.lemmy.ml/post/1723", + "published": "2021-11-09T11:42:35Z", + "tag": [ + { + "type": "Mention", + "href": "https://ds9.lemmy.ml/u/nutomic" + } + ], + "url": "https://friends.grishka.me/posts/66561", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://ds9.lemmy.ml/u/nutomic" + ], + "replies": { + "type": "Collection", + "id": "https://friends.grishka.me/posts/66561/replies", + "first": { + "type": "CollectionPage", + "partOf": "https://friends.grishka.me/posts/66561/replies", + "next": "https://friends.grishka.me/posts/66561/replies?page=1" + } + }, + "sensitive": false, + "likes": "https://friends.grishka.me/posts/66561/likes", + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "sensitive": "as:sensitive" + } + ] +} \ No newline at end of file diff --git a/plugins/ActivityPub/tests/fixtures/smithereen/objects/person.jsonld b/plugins/ActivityPub/tests/fixtures/smithereen/objects/person.jsonld new file mode 100755 index 0000000000..2773aab225 --- /dev/null +++ b/plugins/ActivityPub/tests/fixtures/smithereen/objects/person.jsonld @@ -0,0 +1,83 @@ +{ + "type": "Person", + "id": "https://friends.grishka.me/users/1", + "name": "Григорий Клюшников", + "icon": { + "type": "Image", + "image": { + "type": "Image", + "url": "https://friends.grishka.me/i/6QLsOws97AWp5N_osd74C1IC1ijnFopyCBD9MSEeXNQ/q:93/bG9jYWw6Ly8vcy91cGxvYWRzL2F2YXRhcnMvNTYzODRhODEwODk5ZTRjMzI4YmY4YmQwM2Q2MWM3NmMud2VicA.jpg", + "mediaType": "image/jpeg", + "width": 1280, + "height": 960 + }, + "width": 573, + "height": 572, + "cropRegion": [ + 0.26422762870788574, + 0.3766937553882599, + 0.7113820910453796, + 0.9728997349739075 + ], + "url": "https://friends.grishka.me/i/ql_49PQcETAWgY_nC-Qj63H_Oa6FyOAEoWFkUSSkUvQ/c:573:572:nowe:338:362/q:93/bG9jYWw6Ly8vcy91cGxvYWRzL2F2YXRhcnMvNTYzODRhODEwODk5ZTRjMzI4YmY4YmQwM2Q2MWM3NmMud2VicA.jpg", + "mediaType": "image/jpeg" + }, + "summary": "

Делаю эту хрень, пытаюсь вырвать социальные сети из жадных лап корпораций

\n

\n

\n

\n

This server does NOT support direct messages. Please write me on Telegram or Matrix (@grishk:matrix.org).

", + "url": "https://friends.grishka.me/grishka", + "preferredUsername": "grishka", + "inbox": "https://friends.grishka.me/users/1/inbox", + "outbox": "https://friends.grishka.me/users/1/outbox", + "followers": "https://friends.grishka.me/users/1/followers", + "following": "https://friends.grishka.me/users/1/following", + "endpoints": { + "sharedInbox": "https://friends.grishka.me/activitypub/sharedInbox" + }, + "publicKey": { + "id": "https://friends.grishka.me/users/1#main-key", + "owner": "https://friends.grishka.me/users/1", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjlakm+i/d9ER/hIeR7KfiFW+SdLZj2SkKIeM8cmR+YFJuh9ghFqXrkFEjcaqUnAFqe5gYDNSQACnDLA8y4DnzjfGNIohKAnRoa9x6GORmfKQvcnjaTZ53S1NvUiPPyc0Pv/vfCtY/Ab0CEXe5BLqL38oZn817Jf7pBrPRTYH7m012kvwAUTT6k0Y8lPITBEG7nzYbbuGcrN9Y/RDdwE08jmBXlZ45bahRH3VNXVpQE17dCzJB+7k+iJ1R7YCoI+DuMlBYGXGE2KVk46NZTuLnOjFV9SyXfWX4/SrJM4oxev+SX2N75tQgmNZmVVHeqg2ZcbC0WCfNjJOi2HHS9MujwIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "wall": "https://friends.grishka.me/users/1/wall", + "firstName": "Григорий", + "lastName": "Клюшников", + "middleName": "Александрович", + "vcard:bday": "1993-01-22", + "gender": "http://schema.org#Male", + "supportsFriendRequests": true, + "friends": "https://friends.grishka.me/users/1/friends", + "groups": "https://friends.grishka.me/users/1/groups", + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "sm": "http://smithereen.software/ns#", + "cropRegion": { + "@id": "sm:cropRegion", + "@container": "@list" + }, + "wall": { + "@id": "sm:wall", + "@type": "@id" + }, + "sc": "http://schema.org#", + "firstName": "sc:givenName", + "lastName": "sc:familyName", + "middleName": "sc:additionalName", + "gender": { + "@id": "sc:gender", + "@type": "sc:GenderType" + }, + "supportsFriendRequests": "sm:supportsFriendRequests", + "maidenName": "sm:maidenName", + "friends": { + "@id": "sm:friends", + "@type": "@id" + }, + "groups": { + "@id": "sm:groups", + "@type": "@id" + }, + "vcard": "http://www.w3.org/2006/vcard/ns#" + }, + "https://w3id.org/security/v1" + ] +} \ No newline at end of file