Inbox proper response code for follow request

This commit is contained in:
Diogo Cordeiro
2018-07-31 20:55:24 +01:00
parent 933a228072
commit b7ac51a967
2 changed files with 3 additions and 2 deletions

View File

@@ -871,8 +871,9 @@ class ActivityPubReturn
* @param array $res
* @return void
*/
public static function answer($res)
public static function answer($res, $code = 200)
{
http_response_code($code);
header('Content-Type: application/activity+json');
echo json_encode($res, JSON_UNESCAPED_SLASHES | (isset($_GET["pretty"]) ? JSON_PRETTY_PRINT : null));
exit;