]> git.mxchange.org Git - friendica.git/commitdiff
Fixing the Accepting of contact requests
authorMichael <heluecht@pirati.ca>
Wed, 9 Jan 2019 22:30:26 +0000 (22:30 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 9 Jan 2019 22:30:26 +0000 (22:30 +0000)
src/Protocol/ActivityPub/Processor.php

index 1a631496b9dc10f88a073b4070ddacfb74a24b4c..057457ef3aa193e8d4b7d545f853a24d653b4767 100644 (file)
@@ -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']);
        }