From d918967281652ead0130c5dbef663e82003d4393 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 22 Aug 2021 10:57:02 +0300 Subject: ActivityPub: handle user deletion for suspended users --- .../snapshots/activity/test_suspended_user.json | 47 ++++++++++++++++++++++ .../resources/snapshots/activity/testdelete.json | 8 ++++ 2 files changed, 55 insertions(+) create mode 100644 src/test/resources/snapshots/activity/test_suspended_user.json create mode 100644 src/test/resources/snapshots/activity/testdelete.json (limited to 'src/test/resources') diff --git a/src/test/resources/snapshots/activity/test_suspended_user.json b/src/test/resources/snapshots/activity/test_suspended_user.json new file mode 100644 index 00000000..b0d8e97b --- /dev/null +++ b/src/test/resources/snapshots/activity/test_suspended_user.json @@ -0,0 +1,47 @@ +{ + "@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" }, + "featuredTags": { "@id": "toot:featuredTags", "@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", + "suspended": "toot:suspended" + } + ], + "id": "https://example.com/u/testuser", + "type": "Person", + "url": "https://example.com/u/testuser", + "manuallyApprovesFollowers": false, + "discoverable": false, + "suspended": true, + "publicKey": { + "id": "https://example.com/u/testuser#main-key", + "owner": "https://example.com/u/testuser", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiHKRdKFFeT4P/MVlNbxC\nbbgXOkEdeQzvJB/wAJgSYbUwm9SzNFzttePQXk3/MWoK2awWUInZTduVHsWt8zU7\nO3d9PAW6YH6L1oDkjgMLAb9aUWV2ClQWMwsn88WKK9Rb1WOmd8BrXjPfmeFK2ypQ\n9eg8aKpH36WAXiiaTDfBupBZ0Ki2+E87BrWxpbUeDC1dkV+zbl8BMm7X0rp+reoC\nYUWMcjQMzhMmQOXUd4zwJIDPZDMdF4beq/y6WPSUTVgjs4kPDS1HT60ATnsUqyPE\n6tuGxG4j0msb4TTre87PKxMU5YPOxSiqNL0O/3u9/2shVPpjDa/uy9W+VaeBHbFm\nSQIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "tag": [], + "attachment": [] +} diff --git a/src/test/resources/snapshots/activity/testdelete.json b/src/test/resources/snapshots/activity/testdelete.json new file mode 100644 index 00000000..d7e7af23 --- /dev/null +++ b/src/test/resources/snapshots/activity/testdelete.json @@ -0,0 +1,8 @@ +{ + "@context": "https://www.w3.org/ns/activitystreams", + "id": "https://example.com/u/testuser#delete", + "type": "Delete", + "actor": "https://example.com/u/testuser", + "to": ["https://www.w3.org/ns/activitystreams#Public"], + "object": "https://example.com/u/testuser" +} -- cgit v1.2.3