mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
Outbox / Fetched JSON fix
This commit is contained in:
parent
f5f5f593a5
commit
bdeab7fb83
1 changed files with 5 additions and 5 deletions
|
@ -125,24 +125,24 @@ def post_to_activity(post: Post, community: Community):
|
||||||
],
|
],
|
||||||
"object": {
|
"object": {
|
||||||
"id": create_id,
|
"id": create_id,
|
||||||
"actor": f"https://{current_app.config['SERVER_NAME']}/u/{post.author.user_name}",
|
"actor": post.author.ap_public_url,
|
||||||
"to": [
|
"to": [
|
||||||
"https://www.w3.org/ns/activitystreams#Public"
|
"https://www.w3.org/ns/activitystreams#Public"
|
||||||
],
|
],
|
||||||
"object": {
|
"object": {
|
||||||
"type": "Page",
|
"type": "Page",
|
||||||
"id": f"https://{current_app.config['SERVER_NAME']}/post/{post.id}",
|
"id": post.ap_id,
|
||||||
"attributedTo": f"https://{current_app.config['SERVER_NAME']}/u/{post.author.user_name}",
|
"attributedTo": post.author.ap_public_url,
|
||||||
"to": [
|
"to": [
|
||||||
f"https://{current_app.config['SERVER_NAME']}/c/{community.name}",
|
f"https://{current_app.config['SERVER_NAME']}/c/{community.name}",
|
||||||
"https://www.w3.org/ns/activitystreams#Public"
|
"https://www.w3.org/ns/activitystreams#Public"
|
||||||
],
|
],
|
||||||
"name": post.title,
|
"name": post.title,
|
||||||
"cc": [],
|
"cc": [],
|
||||||
"content": post.body_html,
|
"content": post.body_html if post.body_html else '',
|
||||||
"mediaType": "text/html",
|
"mediaType": "text/html",
|
||||||
"source": {
|
"source": {
|
||||||
"content": post.body,
|
"content": post.body if post.body else '',
|
||||||
"mediaType": "text/markdown"
|
"mediaType": "text/markdown"
|
||||||
},
|
},
|
||||||
"attachment": [],
|
"attachment": [],
|
||||||
|
|
Loading…
Add table
Reference in a new issue