From: Michael Date: Wed, 9 Jan 2019 22:30:26 +0000 (+0000) Subject: Fixing the Accepting of contact requests X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=defc89fa9a21e1ddcfd01c33240fc26d53d02996;p=friendica.git Fixing the Accepting of contact requests --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 1a631496b9..057457ef3a 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -370,6 +370,7 @@ class Processor $cid = Contact::getIdForURL($activity['actor'], $uid); if (!empty($cid)) { self::switchContact($cid); + DBA::update('contact', ['hub-verify' => $activity['id']], ['id' => $cid]); $contact = DBA::selectFirst('contact', [], ['id' => $cid, 'network' => Protocol::NATIVE_SUPPORT]); } else { $contact = false; @@ -387,7 +388,10 @@ class Processor return; } - DBA::update('contact', ['hub-verify' => $activity['id']], ['id' => $cid]); + if (empty($contact)) { + DBA::update('contact', ['hub-verify' => $activity['id']], ['id' => $cid]); + } + Logger::log('Follow user ' . $uid . ' from contact ' . $cid . ' with id ' . $activity['id']); }