Revert some changes because mastodon folks know about 202
This commit is contained in:
parent
3121d3435d
commit
dd01971997
@ -118,13 +118,17 @@ class Activitypub_postman
|
|||||||
|
|
||||||
if ($res->getStatusCode() == 200 || $res->getStatusCode() == 409) {
|
if ($res->getStatusCode() == 200 || $res->getStatusCode() == 409) {
|
||||||
$pending_list = new Activitypub_pending_follow_requests($this->actor->getID(), $this->to[0]->getID());
|
$pending_list = new Activitypub_pending_follow_requests($this->actor->getID(), $this->to[0]->getID());
|
||||||
|
if (! ($res->getStatusCode() == 202 || $res_body->type == "Accept" || $res->getStatusCode() == 409)) {
|
||||||
$pending_list->add();
|
$pending_list->add();
|
||||||
|
throw new Exception("Your follow request is pending acceptation.");
|
||||||
|
}
|
||||||
|
$pending_list->remove();
|
||||||
return true;
|
return true;
|
||||||
} elseif (isset($res_body[0]->error)) {
|
} elseif (isset($res_body[0]->error)) {
|
||||||
throw new Exception($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.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user