]> git.mxchange.org Git - friendica.git/commitdiff
Only fetch the gsid when it had been empty before
authorMichael <heluecht@pirati.ca>
Fri, 22 May 2020 11:29:58 +0000 (11:29 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 22 May 2020 11:29:58 +0000 (11:29 +0000)
src/Model/APContact.php

index 5112f3dd6c97ba45870c70a19595bef87715c7be..73b6143b48cd5a4445840cb7d0e65b4f5978ba8c 100644 (file)
@@ -291,8 +291,10 @@ class APContact
                        $apcontact['baseurl'] = null;
                }
 
-               if (!empty($apcontact['baseurl'])) {
+               if (!empty($apcontact['baseurl']) && empty($fetched_contact['gsid'])) {
                        $apcontact['gsid'] = GServer::getID($apcontact['baseurl']);
+               } elseif (!empty($fetched_contact['gsid'])) {
+                       $apcontact['gsid'] = $fetched_contact['gsid'];
                }
 
                if ($apcontact['url'] == $apcontact['alias']) {