Add /api/v1/instance, start work on ap_activity model, rework save/load files to use json helper functions, remove client_app model json template, implement notification model
parent
808f912b1e
commit
6706606cf8
@ -1 +1 @@
|
||||
Subproject commit dd2f8484a1d2cafe8dee4ee1e3104664e3213716
|
||||
Subproject commit 8853784e4d4cc3954c0bf12ad46ede4b1eabb56a
|
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
struct ap_signature;
|
||||
|
||||
struct ap_activity
|
||||
{
|
||||
char* id;
|
||||
char* type;
|
||||
char* actor;
|
||||
struct {
|
||||
char** items;
|
||||
int count;
|
||||
} to;
|
||||
char* object;
|
||||
struct ap_signature* signature;
|
||||
};
|
||||
|
||||
struct json_field_type;
|
||||
extern struct json_field_type json_field_object_activity;
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"secret": "%s{app->client.secret}",
|
||||
"name": "%s{app->client.name}",
|
||||
"auth_code": "%s{ safe(app->auth_code) }",
|
||||
"redirect_uri": "%s{ safe(app->redirect_uri) }",
|
||||
"access_token": "%s{ safe(app->access_token) }"
|
||||
}
|
@ -1,11 +1,15 @@
|
||||
{
|
||||
"account": %( account_write_as_json(a,f); ),
|
||||
"created_at": "2022-12-12T15:31:54.000Z",
|
||||
"id": "%d{n->id}",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": false
|
||||
},
|
||||
"status": %( api_status_write_as_json(s,f); ),
|
||||
"type": "favourite"
|
||||
"account": %( account_write_as_json(a,f); ),
|
||||
"created_at": "2022-12-12T15:31:54.000Z",
|
||||
"id": "%d{n->id}",
|
||||
"pleroma": {
|
||||
"is_muted": false,
|
||||
"is_seen": false
|
||||
},
|
||||
"status": %( api_status_write_as_json(s,f); ),
|
||||
"type": "%(
|
||||
switch(n->type) {
|
||||
case nt_favorite: fprintf(f,"favourite"); break;
|
||||
default: fprintf(f,"unknown-%d",n->type); break;
|
||||
}; )"
|
||||
}
|
||||
|
@ -0,0 +1,84 @@
|
||||
{
|
||||
"approval_required":false,
|
||||
"avatar_upload_limit":2000000,
|
||||
"background_image":"https://pl.polaris-1.work/images/city.jpg",
|
||||
"background_upload_limit":4000000,
|
||||
"banner_upload_limit":4000000,
|
||||
"description":"Apogee: A Single-User ActivityPub Server",
|
||||
"description_limit":5000,
|
||||
"email":"teknomunk@protonmail.com",
|
||||
"languages":["en"],
|
||||
"max_toot_chars":5000,
|
||||
"pleroma":{
|
||||
"metadata":{
|
||||
"account_activation_required":false,
|
||||
"features":[
|
||||
"pleroma_api",
|
||||
"mastodon_api"
|
||||
%( /*
|
||||
"mastodon_api_streaming",
|
||||
"polls",
|
||||
"pleroma_explicit_addressing",
|
||||
"shareable_emoji_packs",
|
||||
"multifetch",
|
||||
"pleroma:api/v1/notifications:include_types_filter",
|
||||
"chat",
|
||||
"shout",
|
||||
"relay",
|
||||
"pleroma_emoji_reactions",
|
||||
"pleroma_chat_messages"
|
||||
*/ )
|
||||
],
|
||||
"federation":{
|
||||
"enabled":false,
|
||||
"exclusions":false,
|
||||
"mrf_hashtag":{
|
||||
"federated_timeline_removal":[],
|
||||
"reject":[],
|
||||
"sensitive":["nsfw"]
|
||||
},
|
||||
"mrf_object_age":{
|
||||
"actions":["delist","strip_followers"],
|
||||
"threshold":604800
|
||||
},
|
||||
"mrf_policies":["ObjectAgePolicy","TagPolicy","HashtagPolicy"],
|
||||
"quarantined_instances":[]
|
||||
},
|
||||
"fields_limits":{
|
||||
"max_fields":10,
|
||||
"max_remote_fields":20,
|
||||
"name_length":512,
|
||||
"value_length":2048
|
||||
},
|
||||
"post_formats":[
|
||||
"text/plain",
|
||||
"text/markdown",
|
||||
"text/bbcode",
|
||||
"text/html"
|
||||
]
|
||||
},
|
||||
"stats":{"mau":1},
|
||||
"vapid_public_key":"BIAQBuhbJJ-kSDSy3lfx9amo0iMk4jG4e4OSwJi4-N908lHWspxLy2p7sACjyW8dtJkLUSP00midXnaOIZxOVTo"
|
||||
},
|
||||
"poll_limits":{
|
||||
"max_expiration":31536000,
|
||||
"max_option_chars":200,
|
||||
"max_options":20,
|
||||
"min_expiration":0
|
||||
},
|
||||
"registrations":false,
|
||||
"shout_limit":5000,
|
||||
"stats":{
|
||||
"domain_count":0,
|
||||
"status_count":5,
|
||||
"user_count":1
|
||||
},
|
||||
"thumbnail":"https://pl.polaris-1.work/media/27313e491a834971b8d868e121fcf3e279b109dca0351b87310a2a367b3a6237.png",
|
||||
"title":"%s{g_server_name}",
|
||||
"upload_limit":1600000000,
|
||||
"uri":"https:/%s{g_server_name}",
|
||||
"urls":{
|
||||
%(/*"streaming_api":"wss://pl.polaris-1.work"*/)
|
||||
},
|
||||
"version":"0.1alpha"
|
||||
}
|
Loading…
Reference in new issue