mirror of https://gitlab.com/bashrc2/epicyon
Remove webfinger from actor
parent
535df7c293
commit
a7fabb69fd
|
@ -28,20 +28,12 @@ Here's an example of the actor record of our friend Alyssa P. Hacker:
|
|||
|
||||
### Example 1
|
||||
``` json
|
||||
{"aliases": ["https://instancedomain/@Alyssa",
|
||||
"https://instancedomain/users/Alyssa"],
|
||||
"links": [{"href": "https://instancedomain/@Alyssa",
|
||||
"rel": "http://webfinger.net/rel/profile-page",
|
||||
"type": "text/html"},
|
||||
{"href": "https://instancedomain/users/Alyssa",
|
||||
"rel": "self",
|
||||
"type": "application/activity+json"},
|
||||
{"rel": "http://ostatus.org/schema/1.0/subscribe",
|
||||
"template": "https://instancedomain/authorize_interaction?uri={uri}"}],
|
||||
"subject": "acct:Alyssa@instancedomain"}
|
||||
{"@context": ["https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://w3id.org/security/v1",
|
||||
{"Curve25519Key": "toot:Curve25519Key",
|
||||
{
|
||||
"Curve25519Key": "toot:Curve25519Key",
|
||||
"Device": "toot:Device",
|
||||
"Ed25519Key": "toot:Ed25519Key",
|
||||
"Ed25519Signature": "toot:Ed25519Signature",
|
||||
|
@ -66,7 +58,9 @@ Here's an example of the actor record of our friend Alyssa P. Hacker:
|
|||
"schema": "http://schema.org#",
|
||||
"suspended": "toot:suspended",
|
||||
"toot": "http://joinmastodon.org/ns#",
|
||||
"value": "schema:value"}],
|
||||
"value": "schema:value"
|
||||
}
|
||||
],
|
||||
"alsoKnownAs": ["https://activitypubhackers/users/Alyssa"],
|
||||
"attachment": [{"name": "XMPP",
|
||||
"type": "PropertyValue",
|
||||
|
@ -99,7 +93,8 @@ Here's an example of the actor record of our friend Alyssa P. Hacker:
|
|||
"summary": "<p>Hacker in residence</p>",
|
||||
"tag": [],
|
||||
"type": "Person",
|
||||
"url": "https://instancedomain/@Alyssa"}
|
||||
"url": "https://instancedomain/@Alyssa"
|
||||
}
|
||||
```
|
||||
|
||||
ActivityPub uses [ActivityStreams](https://www.w3.org/TR/activitystreams-core) for its [vocabulary](https://www.w3.org/TR/activitystreams-vocabulary). This is pretty great because ActivityStreams includes all the common terms you need to represent all the activities and content flowing around a social network. It's likely that ActivityStreams already includes all the vocabulary you need, but even if it doesn't, ActivityStreams can be extended via [JSON-LD](https://en.wikipedia.org/wiki/JSON-LD). If you know what JSON-LD is, you can take advantage of the cool linked data approaches provided by JSON-LD. If you don't, don't worry, JSON-LD documents and ActivityStreams can be understood as plain old simple JSON. (If you're going to add extensions, that's the point at which JSON-LD really helps you out).
|
||||
|
@ -121,7 +116,8 @@ Let's see an example! Let's say Alyssa wants to catch up with her friend, Ben Bi
|
|||
|
||||
### Example 2
|
||||
``` json
|
||||
{"@context": "https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"type": "Note",
|
||||
"to": ["https://chatty.example/users/ben"],
|
||||
"attributedTo": "https://instancedomain/users/alyssa",
|
||||
|
@ -130,7 +126,8 @@ Let's see an example! Let's say Alyssa wants to catch up with her friend, Ben Bi
|
|||
"mediaType": "text/html",
|
||||
"attachment": [],
|
||||
"summary": "Book",
|
||||
"content": "Say, did you finish reading that book I lent you?"}
|
||||
"content": "Say, did you finish reading that book I lent you?"
|
||||
}
|
||||
```
|
||||
|
||||
This is a note addressed to Ben. Since she doesn't want to distract him too much she includes a summary line, which is similar to an email subject line. She POSTs it to her outbox.
|
||||
|
@ -141,7 +138,8 @@ Since this is a non-activity object, the server recognizes that this is an objec
|
|||
|
||||
### Example 3
|
||||
``` json
|
||||
{"@context": "https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"type": "Create",
|
||||
"id": "https://instancedomain/users/alyssa/statuses/a29a6843/activity",
|
||||
"to": ["https://chatty.example/users/ben"],
|
||||
|
@ -157,7 +155,8 @@ Since this is a non-activity object, the server recognizes that this is an objec
|
|||
"attachment": [],
|
||||
"summary": "Book",
|
||||
"content": "Say, did you finish reading that book I lent you?"
|
||||
}}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Alyssa's server looks up Ben's [ActivityStreams actor object](https://www.w3.org/TR/activitystreams-vocabulary/#actor-types), finds his inbox endpoint, and POSTs her object to his inbox.
|
||||
|
@ -172,7 +171,8 @@ Cool! A while later, Alyssa checks what new messages she's gotten. Her phone pol
|
|||
|
||||
### Example 4
|
||||
``` json
|
||||
{"@context": "https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"type": "Create",
|
||||
"id": "https://chatty.example/users/ben/statuses/51086/activity",
|
||||
"to": ["https://instancedomain/users/alyssa"],
|
||||
|
@ -189,19 +189,22 @@ Cool! A while later, Alyssa checks what new messages she's gotten. Her phone pol
|
|||
"content": "<p>Argh, yeah, sorry, I'll get it back to you tomorrow.</p>
|
||||
<p>I was reviewing the section on register machines,
|
||||
since it's been a while since I wrote one.</p>"
|
||||
}}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Alyssa is relieved, and likes Ben's post:
|
||||
|
||||
### Example 5
|
||||
``` json
|
||||
{"@context": "https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"type": "Like",
|
||||
"id": "https://instancedomain/users/alyssa/statuses/5312e10e",
|
||||
"to": ["https://chatty.example/users/ben/"],
|
||||
"actor": "https://instancedomain/users/alyssa/",
|
||||
"object": "https://chatty.example/users/ben/statuses/51086"}
|
||||
"object": "https://chatty.example/users/ben/statuses/51086"
|
||||
}
|
||||
```
|
||||
|
||||
She POSTs this message to her outbox. (Since it's an activity, her server knows it doesn't need to wrap it in a Create object).
|
||||
|
@ -210,7 +213,8 @@ Feeling happy about things, she decides to post a public message to her follower
|
|||
|
||||
### Example 6
|
||||
``` json
|
||||
{"@context": "https://www.w3.org/ns/activitystreams",
|
||||
{
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
"type": "Create",
|
||||
"id": "https://instancedomain/users/alyssa/statuses/9282e9cc/activity",
|
||||
"to": ["https://instancedomain/users/alyssa/followers",
|
||||
|
@ -226,7 +230,8 @@ Feeling happy about things, she decides to post a public message to her follower
|
|||
"rejectReplies": False,
|
||||
"mediaType": "text/html",
|
||||
"content": "Lending books to friends is nice. Getting them back is even nicer! :)"
|
||||
}}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 1.1 Social Web Working Group
|
||||
|
@ -287,6 +292,7 @@ As an example, if example.com receives the activity
|
|||
"id": "https://example.org/users/~alice/note/23",
|
||||
"type": "Note",
|
||||
"attributedTo": "https://example.org/users/~alice",
|
||||
"mediaType": "text/html",
|
||||
"content": "I'm a goat"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue