From 21ab11ac18ba5593bab7f2bf37be5212f91e27da Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 22 May 2020 11:29:58 +0000 Subject: [PATCH] Only fetch the gsid when it had been empty before --- src/Model/APContact.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 5112f3dd6..73b6143b4 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']) {