diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 5112f3dd6c..73b6143b48 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -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']) {