]> git.mxchange.org Git - friendica.git/commitdiff
Follow up to #7036: Automatically update AP contacts
authorMichael <heluecht@pirati.ca>
Thu, 25 Apr 2019 05:24:53 +0000 (05:24 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 25 Apr 2019 05:24:53 +0000 (05:24 +0000)
src/Model/APContact.php

index 161a231f00d89ec958245694a6c4fe243d687099..c2dbcf590a629f983e615f7417e70559b54546a4 100644 (file)
@@ -89,12 +89,12 @@ class APContact extends BaseObject
                                $apcontact = DBA::selectFirst('apcontact', [], ['addr' => $url]);
                        }
 
-                       if (DBA::isResult($apcontact) && ($apcontact['updated'] > $ref_update)) {
+                       if (DBA::isResult($apcontact) && ($apcontact['updated'] > $ref_update) && !empty($apcontact['pubkey'])) {
                                return $apcontact;
                        }
 
                        if (!is_null($update)) {
-                               return false;
+                               return DBA::isResult($apcontact) ? $apcontact : false;
                        }
                }