From 0e29ec200f65efe83e5de209394dd41063b6477d Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 25 Apr 2019 05:24:53 +0000 Subject: [PATCH] Follow up to #7036: Automatically update AP contacts --- src/Model/APContact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 161a231f00..c2dbcf590a 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -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; } }