Style fixes

This commit is contained in:
Anthony Wang 2023-01-19 18:24:59 -05:00
parent f7403f75da
commit dc3f6329b2
No known key found for this signature in database
GPG key ID: 42A5B952E6DD8D38
5 changed files with 9 additions and 11 deletions

View file

@ -4,10 +4,10 @@
"actor": "https://0.exozy.me/users/test.jsonld", "actor": "https://0.exozy.me/users/test.jsonld",
"object": { "object": {
"@context": "https://www.w3.org/ns/activitystreams", "@context": "https://www.w3.org/ns/activitystreams",
"id": "https://social.exozy.me/9a9e4ad7-f86a-4190-8782-9df9951c5ff6",
"type": "Follow", "type": "Follow",
"id": "https://social.exozy.me/9a9e4ad7-f86a-4190-8782-9df9951c5ff6",
"actor": "https://social.exozy.me/users/a", "actor": "https://social.exozy.me/users/a",
"object": "https://0.exozy.me/users/test.jsonld" "object": "https://0.exozy.me/users/test.jsonld"
}, },
"to": "https://social.exozy.me/users/a" "to": ["https://social.exozy.me/users/a"]
} }

View file

@ -1,14 +1,14 @@
{ {
"@context": "https://www.w3.org/ns/activitystreams", "@context": "https://www.w3.org/ns/activitystreams",
"id": "https://0.exozy.me/users/test.outbox#helloworld2",
"type": "Create", "type": "Create",
"id": "https://0.exozy.me/users/test.outbox#helloworld2",
"actor": "https://0.exozy.me/users/test.jsonld", "actor": "https://0.exozy.me/users/test.jsonld",
"object": { "object": {
"id": "https://0.exozy.me/users/test.statuses/helloworld2",
"type": "Note", "type": "Note",
"id": "https://0.exozy.me/users/test.statuses/helloworld2",
"attributedTo": "https://0.exozy.me/users/test.jsonld", "attributedTo": "https://0.exozy.me/users/test.jsonld",
"content": "Hello from fuwuqi 2.0!!! 🙃", "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"]
} }

View file

@ -1,8 +1,8 @@
{ {
"@context": "https://www.w3.org/ns/activitystreams", "@context": "https://www.w3.org/ns/activitystreams",
"id": "https://0.exozy.me/users/test.outbox#follow",
"type": "Follow", "type": "Follow",
"id": "https://0.exozy.me/users/test.outbox#follow",
"actor": "https://0.exozy.me/users/test.jsonld", "actor": "https://0.exozy.me/users/test.jsonld",
"object": "https://social.exozy.me/users/a", "object": "https://social.exozy.me/users/a",
"to": "https://social.exozy.me/users/a" "to": ["https://social.exozy.me/users/a"]
} }

View file

@ -104,8 +104,6 @@ class fuwuqi(SimpleHTTPRequestHandler):
# C2S # C2S
collection_append(username, 'outbox', activity) collection_append(username, 'outbox', activity)
# Clients responsible for addressing activity # Clients responsible for addressing activity
if type(activity['to']) is not list:
activity['to'] = [activity['to']]
for to in activity['to']: for to in activity['to']:
if 'followers' in to or to == 'https://www.w3.org/ns/activitystreams#Public': if 'followers' in to or to == 'https://www.w3.org/ns/activitystreams#Public':
with open(f'users/{username}.followers') as f: with open(f'users/{username}.followers') as f:

View file

@ -3,8 +3,8 @@
"https://www.w3.org/ns/activitystreams", "https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1" "https://w3id.org/security/v1"
], ],
"id": "https://0.exozy.me/users/test.jsonld",
"type": "Person", "type": "Person",
"id": "https://0.exozy.me/users/test.jsonld",
"preferredUsername": "test", "preferredUsername": "test",
"name": "Billiam Wender", "name": "Billiam Wender",
"summary": "idk", "summary": "idk",