[PLUGIN][ActivityPub][TESTS] Add GoToSocial test fixtures

This commit is contained in:
tsmethurst 2022-10-21 13:01:32 +02:00
parent 97114e38e0
commit 49a80a3c40
8 changed files with 233 additions and 0 deletions

View File

@ -0,0 +1,14 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "https://gotosocial.org/users/the_mighty_zork",
"id": "https://gotosocial.org/01E41WF691G30VVAV6TZXW10VT",
"object": {
"actor": "http://example.org/users/some_user",
"id": "http://example.org/users/some_user/follow/01FJ1S8DX3STJJ6CEYPMZ1M0R3",
"object": "https://gotosocial.org/users/the_mighty_zork",
"to": "https://gotosocial.org/users/the_mighty_zork",
"type": "Follow"
},
"to": "http://example.org/users/some_user",
"type": "Accept"
}

View File

@ -0,0 +1,10 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "https://example.org/users/the_mighty_zork",
"cc": "https://example.org/users/the_mighty_zork",
"id": "https://example.org/users/the_mighty_zork/statuses/01G74JJ1KS331G2JXHRMZCE0ER",
"object": "https://example.org/users/the_mighty_zork/statuses/01FCTA44PW9H1TB328S9AQXKDS",
"published": "2022-06-09T13:12:00Z",
"to": "https://example.org/users/the_mighty_zork/followers",
"type": "Announce"
}

View File

@ -0,0 +1,44 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "https://example.org/users/admin",
"cc": [
"https://example.org/users/admin/followers",
"https://example.org/users/the_mighty_zork"
],
"id": "https://example.org/users/admin/statuses/01FF25D5Q0DH7CHD57CTRS6WK0/activity",
"object": {
"attachment": [],
"attributedTo": "https://example.org/users/admin",
"cc": [
"https://example.org/users/admin/followers",
"https://example.org/users/the_mighty_zork"
],
"content": "hi @the_mighty_zork welcome to the instance!",
"id": "https://example.org/users/admin/statuses/01FF25D5Q0DH7CHD57CTRS6WK0",
"inReplyTo": "https://example.org/users/the_mighty_zork/statuses/01F8MHAMCHF6Y650WCRSCP4WMY",
"published": "2021-11-20T13:32:16Z",
"replies": {
"first": {
"id": "https://example.org/users/admin/statuses/01FF25D5Q0DH7CHD57CTRS6WK0/replies?page=true",
"next": "https://example.org/users/admin/statuses/01FF25D5Q0DH7CHD57CTRS6WK0/replies?only_other_accounts=false\\u0026page=true",
"partOf": "https://example.org/users/admin/statuses/01FF25D5Q0DH7CHD57CTRS6WK0/replies",
"type": "CollectionPage"
},
"id": "https://example.org/users/admin/statuses/01FF25D5Q0DH7CHD57CTRS6WK0/replies",
"type": "Collection"
},
"sensitive": false,
"summary": "",
"tag": {
"href": "https://example.org/users/the_mighty_zork",
"name": "@the_mighty_zork@localhost:8080",
"type": "Mention"
},
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Note",
"url": "https://example.org/@admin/statuses/01FF25D5Q0DH7CHD57CTRS6WK0"
},
"published": "2021-11-20T13:32:16Z",
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Create"
}

View File

@ -0,0 +1,8 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "https://gotosocial.org/users/the_mighty_zork",
"id": "https://gotosocial.org/users/the_mighty_zork/follow/01F8PY8RHWRQZV038T4E8T9YK8",
"object": "https://example.com/users/admin",
"to": "https://example.org/users/admin",
"type": "Follow"
}

View File

@ -0,0 +1,14 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
"actor": "https://gotosocial.org/users/the_mighty_zork",
"id": "https://gotosocial.org/01WKYFGS71GG2SXJ8T4FG9VRN2",
"object": {
"actor": "http://example.org/users/some_user",
"id": "http://example.org/users/some_user/follow/01FJ1S8DX3STJJ6CEYPMZ1M0R3",
"object": "https://gotosocial.org/users/the_mighty_zork",
"to": "https://gotosocial.org/users/the_mighty_zork",
"type": "Follow"
},
"to": "http://example.org/users/some_user",
"type": "Reject"
}

View File

@ -0,0 +1,53 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
"http://joinmastodon.org/ns"
],
"actor": "https://example.org/users/the_mighty_zork",
"bcc": "https://example.org/users/the_mighty_zork/followers",
"id": "https://example.org/users/the_mighty_zork#updates/011HHHD988G37MD88E1YAF03E4",
"object": {
"discoverable": true,
"featured": "https://example.org/users/the_mighty_zork/collections/featured",
"followers": "https://example.org/users/the_mighty_zork/followers",
"following": "https://example.org/users/the_mighty_zork/following",
"icon": {
"mediaType": "image/jpeg",
"type": "Image",
"url": "https://example.org/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/original/01F8MH58A357CV5K7R7TJMSH6S.jpeg"
},
"id": "https://example.org/users/the_mighty_zork",
"image": {
"mediaType": "image/jpeg",
"type": "Image",
"url": "https://example.org/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/original/01PFPMWK2FF0D9WMHEJHR07C3Q.jpeg"
},
"inbox": "https://example.org/users/the_mighty_zork/inbox",
"manuallyApprovesFollowers": false,
"name": "original zork (he/they)",
"outbox": "https://example.org/users/the_mighty_zork/outbox",
"preferredUsername": "the_mighty_zork",
"publicKey": {
"id": "https://example.org/users/the_mighty_zork/main-key",
"owner": "https://example.org/users/the_mighty_zork",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwXTcOAvM1Jiw5Ffpk0qn\nr0cwbNvFe/5zQ+Tp7tumK/ZnT37o7X0FUEXrxNi+dkhmeJ0gsaiN+JQGNUewvpSk\nPIAXKvi908aSfCGjs7bGlJCJCuDuL5d6m7hZnP9rt9fJc70GElPpG0jc9fXwlz7T\nlsPb2ecatmG05Y4jPwdC+oN4MNCv9yQzEvCVMzl76EJaM602kIHC1CISn0rDFmYd\n9rSN7XPlNJw1F6PbpJ/BWQ+pXHKw3OEwNTETAUNYiVGnZU+B7a7bZC9f6/aPbJuV\nt8Qmg+UnDvW1Y8gmfHnxaWG2f5TDBvCHmcYtucIZPLQD4trAozC4ryqlmCWQNKbt\n0wIDAQAB\n-----END PUBLIC KEY-----\n"
},
"summary": "\\u003cp\\u003ehey yo this is my profile!\\u003c/p\\u003e",
"tag": {
"icon": {
"mediaType": "image/png",
"type": "Image",
"url": "https://example.org/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png"
},
"id": "https://example.org/emoji/01F8MH9H8E4VG3KDYJR9EGPXCQ",
"name": ":rainbow:",
"type": "Emoji",
"updated": "2021-09-20T12:40:37+02:00"
},
"type": "Person",
"url": "https://example.org/@the_mighty_zork"
},
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Update"
}

View File

@ -0,0 +1,44 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"http://joinmastodon.org/ns"
],
"attachment": {
"blurhash": "LNJRdVM{00Rj%Mayt7j[4nWBofRj",
"mediaType": "image/jpeg",
"name": "Black and white image of some 50's style text saying: Welcome On Board",
"type": "Document",
"url": "https://example.org/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/attachment/original/01F8MH6NEM8D7527KZAECTCR76.jpeg"
},
"attributedTo": "https://example.org/users/admin",
"cc": "https://example.org/users/admin/followers",
"content": "hello world! #welcome ! first post on the instance :rainbow: !",
"id": "https://example.org/users/admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R",
"published": "2021-10-20T11:36:45Z",
"replies": {
"first": {
"id": "https://example.org/users/admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R/replies?page=true",
"next": "https://example.org/users/admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R/replies?only_other_accounts=false\\u0026page=true",
"partOf": "https://example.org/users/admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R/replies",
"type": "CollectionPage"
},
"id": "https://example.org/users/admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R/replies",
"type": "Collection"
},
"sensitive": false,
"summary": "",
"tag": {
"icon": {
"mediaType": "image/png",
"type": "Image",
"url": "https://example.org/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png"
},
"id": "https://example.org/emoji/01F8MH9H8E4VG3KDYJR9EGPXCQ",
"name": ":rainbow:",
"type": "Emoji",
"updated": "2021-09-20T10:40:37Z"
},
"to": "https://www.w3.org/ns/activitystreams#Public",
"type": "Note",
"url": "https://example.org/@admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R"
}

View File

@ -0,0 +1,46 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"http://joinmastodon.org/ns",
"https://w3id.org/security/v1"
],
"discoverable": true,
"featured": "https://example.org/users/the_mighty_zork/collections/featured",
"followers": "https://example.org/users/the_mighty_zork/followers",
"following": "https://example.org/users/the_mighty_zork/following",
"icon": {
"mediaType": "image/jpeg",
"type": "Image",
"url": "https://example.org/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/avatar/original/01F8MH58A357CV5K7R7TJMSH6S.jpeg"
},
"id": "https://example.org/users/the_mighty_zork",
"image": {
"mediaType": "image/jpeg",
"type": "Image",
"url": "https://example.org/fileserver/01F8MH1H7YV1Z7D2C8K2730QBF/header/original/01PFPMWK2FF0D9WMHEJHR07C3Q.jpeg"
},
"inbox": "https://example.org/users/the_mighty_zork/inbox",
"manuallyApprovesFollowers": false,
"name": "original zork (he/they)",
"outbox": "https://example.org/users/the_mighty_zork/outbox",
"preferredUsername": "the_mighty_zork",
"publicKey": {
"id": "https://example.org/users/the_mighty_zork/main-key",
"owner": "https://example.org/users/the_mighty_zork",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwXTcOAvM1Jiw5Ffpk0qn\nr0cwbNvFe/5zQ+Tp7tumK/ZnT37o7X0FUEXrxNi+dkhmeJ0gsaiN+JQGNUewvpSk\nPIAXKvi908aSfCGjs7bGlJCJCuDuL5d6m7hZnP9rt9fJc70GElPpG0jc9fXwlz7T\nlsPb2ecatmG05Y4jPwdC+oN4MNCv9yQzEvCVMzl76EJaM602kIHC1CISn0rDFmYd\n9rSN7XPlNJw1F6PbpJ/BWQ+pXHKw3OEwNTETAUNYiVGnZU+B7a7bZC9f6/aPbJuV\nt8Qmg+UnDvW1Y8gmfHnxaWG2f5TDBvCHmcYtucIZPLQD4trAozC4ryqlmCWQNKbt\n0wIDAQAB\n-----END PUBLIC KEY-----\n"
},
"summary": "<p>hey yo this is my profile!</p>",
"tag": {
"icon": {
"mediaType": "image/png",
"type": "Image",
"url": "https://example.org/fileserver/01F8MH17FWEB39HZJ76B6VXSKF/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png"
},
"id": "https://example.org/emoji/01F8MH9H8E4VG3KDYJR9EGPXCQ",
"name": ":rainbow:",
"type": "Emoji",
"updated": "2021-09-20T12:40:37+02:00"
},
"type": "Person",
"url": "https://example.org/@the_mighty_zork"
}