aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2023-01-19 18:24:59 -0500
committerAnthony Wang2023-01-19 18:24:59 -0500
commitdc3f6329b2b22cb94e71b667867e085d48527d14 (patch)
tree2dc98d5af1ffd1b8f5c9a7f548898ab4212d609b
parentf7403f75dab5fea8e1f3dc022a6cfdd523094e1c (diff)
Style fixes
-rw-r--r--accept.jsonld4
-rw-r--r--create.jsonld8
-rw-r--r--follow.jsonld4
-rw-r--r--server.py2
-rw-r--r--users/test.jsonld2
5 files changed, 9 insertions, 11 deletions
diff --git a/accept.jsonld b/accept.jsonld
index ac00005..15c2ea1 100644
--- a/accept.jsonld
+++ b/accept.jsonld
@@ -4,10 +4,10 @@
"actor": "https://0.exozy.me/users/test.jsonld",
"object": {
"@context": "https://www.w3.org/ns/activitystreams",
- "id": "https://social.exozy.me/9a9e4ad7-f86a-4190-8782-9df9951c5ff6",
"type": "Follow",
+ "id": "https://social.exozy.me/9a9e4ad7-f86a-4190-8782-9df9951c5ff6",
"actor": "https://social.exozy.me/users/a",
"object": "https://0.exozy.me/users/test.jsonld"
},
- "to": "https://social.exozy.me/users/a"
+ "to": ["https://social.exozy.me/users/a"]
}
diff --git a/create.jsonld b/create.jsonld
index 224d189..7f420e6 100644
--- a/create.jsonld
+++ b/create.jsonld
@@ -1,14 +1,14 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
- "id": "https://0.exozy.me/users/test.outbox#helloworld2",
"type": "Create",
+ "id": "https://0.exozy.me/users/test.outbox#helloworld2",
"actor": "https://0.exozy.me/users/test.jsonld",
"object": {
- "id": "https://0.exozy.me/users/test.statuses/helloworld2",
"type": "Note",
+ "id": "https://0.exozy.me/users/test.statuses/helloworld2",
"attributedTo": "https://0.exozy.me/users/test.jsonld",
"content": "Hello from fuwuqi 2.0!!! 🙃",
- "to": "https://www.w3.org/ns/activitystreams#Public"
+ "to": ["https://www.w3.org/ns/activitystreams#Public"]
},
- "to": "https://0.exozy.me/users/test.followers"
+ "to": ["https://0.exozy.me/users/test.followers"]
}
diff --git a/follow.jsonld b/follow.jsonld
index c356431..be41818 100644
--- a/follow.jsonld
+++ b/follow.jsonld
@@ -1,8 +1,8 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
- "id": "https://0.exozy.me/users/test.outbox#follow",
"type": "Follow",
+ "id": "https://0.exozy.me/users/test.outbox#follow",
"actor": "https://0.exozy.me/users/test.jsonld",
"object": "https://social.exozy.me/users/a",
- "to": "https://social.exozy.me/users/a"
+ "to": ["https://social.exozy.me/users/a"]
}
diff --git a/server.py b/server.py
index 18fa263..244fa53 100644
--- a/server.py
+++ b/server.py
@@ -104,8 +104,6 @@ class fuwuqi(SimpleHTTPRequestHandler):
# C2S
collection_append(username, 'outbox', activity)
# Clients responsible for addressing activity
- if type(activity['to']) is not list:
- activity['to'] = [activity['to']]
for to in activity['to']:
if 'followers' in to or to == 'https://www.w3.org/ns/activitystreams#Public':
with open(f'users/{username}.followers') as f:
diff --git a/users/test.jsonld b/users/test.jsonld
index a5e58d5..d412cd8 100644
--- a/users/test.jsonld
+++ b/users/test.jsonld
@@ -3,8 +3,8 @@
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
- "id": "https://0.exozy.me/users/test.jsonld",
"type": "Person",
+ "id": "https://0.exozy.me/users/test.jsonld",
"preferredUsername": "test",
"name": "Billiam Wender",
"summary": "idk",