|
|
|
@ -56,6 +56,8 @@ struct ap_object* activity_create_Accept( struct ap_object* act )
|
|
|
|
|
accept = malloc(sizeof(*accept));
|
|
|
|
|
memset(accept,0,sizeof(*accept));
|
|
|
|
|
activity_allocate_local_id(accept);
|
|
|
|
|
ap_object_add_context( accept, "https://www.w3.org/ns/activitystreams");
|
|
|
|
|
ap_object_add_context( accept, "https://apogee.polaris-1.work/schemas/litepub-0.1.jsonld");
|
|
|
|
|
|
|
|
|
|
asprintf( &accept->id,"https://%s/activity/%d", g_server->domain, accept->id );
|
|
|
|
|
accept->type = ap_Accept;
|
|
|
|
@ -91,6 +93,8 @@ struct ap_object* activity_create_EmojiReact( struct status* s, const char* reac
|
|
|
|
|
|
|
|
|
|
struct ap_object* act = ap_object_new();
|
|
|
|
|
activity_allocate_local_id(act);
|
|
|
|
|
ap_object_add_context( act, "https://www.w3.org/ns/activitystreams");
|
|
|
|
|
ap_object_add_context( act, "https://apogee.polaris-1.work/schemas/litepub-0.1.jsonld");
|
|
|
|
|
act->id = aformat( "https://%s/activity/%d", g_server->domain, act->local_id );
|
|
|
|
|
act->actor = aformat( "https://%s/owner/actor", g_server->domain );
|
|
|
|
|
act->type = pleroma_EmojiReact;
|
|
|
|
@ -131,6 +135,8 @@ struct ap_object* activity_create_Follow( struct account* follower, struct accou
|
|
|
|
|
{
|
|
|
|
|
struct ap_object* act = ap_object_new();
|
|
|
|
|
activity_allocate_local_id(act);
|
|
|
|
|
ap_object_add_context( act, "https://www.w3.org/ns/activitystreams");
|
|
|
|
|
ap_object_add_context( act, "https://apogee.polaris-1.work/schemas/litepub-0.1.jsonld");
|
|
|
|
|
act->id = aformat( "https://%s/activity/%d", g_server->domain, act->local_id );
|
|
|
|
|
act->actor = strdup( follower->account_url );
|
|
|
|
|
act->type = ap_Follow;
|
|
|
|
@ -172,6 +178,8 @@ struct ap_object* activity_create_Undo( struct ap_object* act_to_undo )
|
|
|
|
|
{
|
|
|
|
|
struct ap_object* act = ap_object_new();
|
|
|
|
|
activity_allocate_local_id(act);
|
|
|
|
|
ap_object_add_context( act, "https://www.w3.org/ns/activitystreams");
|
|
|
|
|
ap_object_add_context( act, "https://apogee.polaris-1.work/schemas/litepub-0.1.jsonld");
|
|
|
|
|
act->id = aformat( "https://%s/activity/%d", g_server->domain, act->local_id );
|
|
|
|
|
act->actor = strdup( act_to_undo->actor );
|
|
|
|
|
act->type = ap_Undo;
|
|
|
|
@ -227,6 +235,8 @@ int activity_like( struct status* s )
|
|
|
|
|
struct ap_object* activity_create_Note( struct status* s )
|
|
|
|
|
{
|
|
|
|
|
struct ap_object* act = ap_object_new();
|
|
|
|
|
ap_object_add_context( act, "https://www.w3.org/ns/activitystreams");
|
|
|
|
|
ap_object_add_context( act, "https://apogee.polaris-1.work/schemas/litepub-0.1.jsonld");
|
|
|
|
|
act->id = aformat( "https://%s/note/%d", g_server->domain, s->id );
|
|
|
|
|
act->type = ap_Note;
|
|
|
|
|
act->published = s->published;
|
|
|
|
@ -309,6 +319,8 @@ struct ap_object* activity_create_Create( struct ap_object* object )
|
|
|
|
|
{
|
|
|
|
|
struct ap_object* act = ap_object_new();
|
|
|
|
|
activity_allocate_local_id(act);
|
|
|
|
|
ap_object_add_context( act, "https://www.w3.org/ns/activitystreams");
|
|
|
|
|
ap_object_add_context( act, "https://apogee.polaris-1.work/schemas/litepub-0.1.jsonld");
|
|
|
|
|
act->type = ap_Create;
|
|
|
|
|
act->id = aformat( "https://%s/activity/%d", g_server->domain, act->local_id );
|
|
|
|
|
act->object.tag = apaot_activity;
|
|
|
|
|