You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
3.0 KiB
Plaintext
103 lines
3.0 KiB
Plaintext
{
|
|
"account": %( api_Account_write(account,f,1); ),
|
|
"application": null,
|
|
"bookmarked": false,
|
|
"card": null,
|
|
"content": %( json_write_string(f,status_render_source(s)); ),
|
|
"created_at": %( json_write_date_time_string( s->published, f ); ),
|
|
"edited_at": null,
|
|
"emojis": [],
|
|
"favourited": false,
|
|
"favourites_count": %d{ s->likes.count },
|
|
"id": "%d{ s->id }",%(
|
|
if( in_reply_to ) { )
|
|
"in_reply_to_account_id": "%d{ in_reply_to->account_id }",
|
|
"in_reply_to_id": "%d{in_reply_to->id}",%(
|
|
} else { )
|
|
"in_reply_to_account_id": null,
|
|
"in_reply_to_id": null,%(
|
|
} )
|
|
"language": null,
|
|
"media_attachments": [%( for( int i = 0; i < s->media.count; ++i ) { )
|
|
{
|
|
"blurhash": "eRH.A}xs0Kxv00xYR,R+t5R+9Gt6xaNG%%2-;xaM{NGRjD%%Rjs:xaxu",
|
|
"description": null,
|
|
"id": "%d{s->id}.media[%d{i}]",
|
|
"pleroma": {
|
|
"mime_type": "image/png"
|
|
},
|
|
"preview_url": "%s{s->media.items[i]}",
|
|
"remote_url": "%s{s->media.items[i]}",
|
|
"text_url": "%s{s->media.items[i]}",
|
|
"type": "image",
|
|
"url": "%s{s->media.items[i]}"
|
|
}%s{ i < s->media.count - 1 ? "," : "" }
|
|
%( } )],
|
|
"mentions": [%( for( int i = 0; i < s->mentions.count; ++i ) { )
|
|
%( struct account* mention = account_from_id( s->mentions.items[i] ); )
|
|
%s{ i != 0 ? "," : "" }{
|
|
"acct": "%s{mention->handle}@%s{mention->server}",
|
|
"id": "%d{mention->id}",
|
|
"url": "%s{mention->account_url}",
|
|
"username": "%s{mention->handle}"
|
|
}
|
|
%( account_free(mention); )
|
|
%( } )],
|
|
"muted": false,
|
|
"pinned": false,
|
|
"pleroma": {
|
|
"content": {
|
|
"text/plain": %( json_write_string(f,s->source ? s->source : ""); )
|
|
},
|
|
"conversation_id": %d{s->root_status_id},
|
|
"direct_conversation_id": null,
|
|
"emoji_reactions": [%( for( int i = 0; i < s->reacts.count; ++i ) { struct status_react* sr = s->reacts.items[i];)
|
|
%(
|
|
bool includes_me( struct status_react* sr ) {
|
|
for( int i = 0; i < sr->accounts.count; ++i ) {
|
|
if( sr->accounts.items[i] == owner_account_id ) { return true; }
|
|
}
|
|
return false;
|
|
}
|
|
)
|
|
{
|
|
"count": %d{ sr->accounts.count },
|
|
"me": %s{ includes_me(sr) ? "true" : "false" },
|
|
"name": %( json_write_string( f, sr->code ); )
|
|
}%s{ i != s->reacts.count-1 ? "," : "" }
|
|
%( } )],
|
|
"expires_at": null,%(
|
|
if( in_reply_to_account ) { )
|
|
"in_reply_to_account_acct": "%s{in_reply_to_account->handle}@%s{in_reply_to_account->server}",
|
|
"local": %s{ s->remote ? "false" : "true" },
|
|
"parent_visible": true,%(
|
|
} else { )
|
|
"in_reply_to_account_acct": null,
|
|
"local": %s{ s->remote ? "false" : "true" },
|
|
"parent_visible": false,%(
|
|
} )
|
|
"pinned_at": null,
|
|
"spoiler_text": {
|
|
"text/plain": ""
|
|
},
|
|
"thread_muted": false
|
|
},
|
|
"poll": null,
|
|
%(
|
|
if( repost ) { )
|
|
"reblog": %( api_status_write_as_json( repost, f ); ),%(
|
|
} else { )
|
|
"reblog": null,%(
|
|
} )
|
|
"reblogged": %s{ s->reposts.count > 0 ? "true": "false" },
|
|
"reblogs_count": %d{ s->reposts.count },
|
|
"replies_count": 0,
|
|
"sensitive": false,
|
|
"spoiler_text": "",
|
|
"tags": [],
|
|
"text": null,
|
|
"uri": "%s{s->url}",
|
|
"url": "%s{s->url}",
|
|
"visibility": "public"
|
|
}
|