Revert some changes because mastodon folks know about 202

This commit is contained in:
Diogo Cordeiro 2018-07-31 20:31:28 +01:00
parent 3121d3435d
commit dd01971997

View File

@ -118,13 +118,17 @@ class Activitypub_postman
if ($res->getStatusCode() == 200 || $res->getStatusCode() == 409) {
$pending_list = new Activitypub_pending_follow_requests($this->actor->getID(), $this->to[0]->getID());
$pending_list->add();
if (! ($res->getStatusCode() == 202 || $res_body->type == "Accept" || $res->getStatusCode() == 409)) {
$pending_list->add();
throw new Exception("Your follow request is pending acceptation.");
}
$pending_list->remove();
return true;
} elseif (isset($res_body[0]->error)) {
throw new Exception($res_body[0]->error);
} else {
throw new Exception("An unknown error occurred.");
}
throw new Exception("An unknown error occurred.");
}
/**