|
|
|
@ -91,8 +91,12 @@ bool route_mastodon_api( struct http_request* req )
|
|
|
|
|
};
|
|
|
|
|
show_notifications( req, ¬e, 1 );
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if( http_request_route( req, "statuses" ) ) {
|
|
|
|
|
} else if( http_request_route( req, "filters" ) ) {
|
|
|
|
|
http_request_send_headers( req, 200, "application/json", true );
|
|
|
|
|
FILE* f = http_request_get_response_body( req );
|
|
|
|
|
fprintf( f, "[]" );
|
|
|
|
|
return true;
|
|
|
|
|
} else if( http_request_route( req, "statuses" ) ) {
|
|
|
|
|
if( http_request_route( req, "/" ) ) {
|
|
|
|
|
int id = -1;
|
|
|
|
|
|
|
|
|
@ -109,9 +113,7 @@ bool route_mastodon_api( struct http_request* req )
|
|
|
|
|
} else if( http_request_route_method( req, "POST" ) ) {
|
|
|
|
|
return handle_post(req, owner);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( http_request_route( req, "timelines/" ) ) {
|
|
|
|
|
} else if( http_request_route( req, "timelines/" ) ) {
|
|
|
|
|
if( http_request_route( req, "home" ) ) {
|
|
|
|
|
return handle_timeline( req, tli_home );
|
|
|
|
|
} else if( http_request_route( req, "public" ) ) {
|
|
|
|
@ -121,6 +123,11 @@ bool route_mastodon_api( struct http_request* req )
|
|
|
|
|
|
|
|
|
|
if( http_request_route( req, "verify_credentials" ) ) {
|
|
|
|
|
return true;
|
|
|
|
|
} else if( http_request_route( req, "relationships" ) ) {
|
|
|
|
|
http_request_send_headers( req, 200, "application/json", true );
|
|
|
|
|
FILE* f = http_request_get_response_body( req );
|
|
|
|
|
fprintf( f, "[]" );
|
|
|
|
|
return true;
|
|
|
|
|
} else if( http_request_route( req, "statuses" ) ) {
|
|
|
|
|
return handle_timeline( req, tli_owner );
|
|
|
|
|
}
|
|
|
|
|