1
1
Fork 0

Merge pull request #7800 from annando/manually-improve

AP: Respect "manually approve" during contact request
This commit is contained in:
Hypolite Petovan 2019-11-02 12:45:43 -04:00 committed by GitHub
commit b8a22de2d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2298,7 +2298,13 @@ class Contact extends BaseObject
$hidden = (($protocol === Protocol::MAIL) ? 1 : 0);
$pending = in_array($protocol, [Protocol::ACTIVITYPUB]);
$pending = false;
if ($protocol == Protocol::ACTIVITYPUB) {
$apcontact = APContact::getByURL($url, false);
if (isset($apcontact['manually-approve'])) {
$pending = (bool)$apcontact['manually-approve'];
}
}
if (in_array($protocol, [Protocol::MAIL, Protocol::DIASPORA, Protocol::ACTIVITYPUB])) {
$writeable = 1;