1
0
Fork 0

Support for contact uri that aren't HTTP URLs

This commit is contained in:
Michael 2023-06-05 04:34:06 +00:00
commit dfaa4b89c7
3 changed files with 6 additions and 6 deletions

View file

@ -2773,7 +2773,7 @@ class Contact
}
$update = false;
$guid = ($ret['guid'] ?? '') ?: Item::guidFromUri($ret['url']);
$guid = ($ret['guid'] ?? '') ?: Item::guidFromUri($ret['url'], $ret['baseurl'] ?: $ret['alias']);
// make sure to not overwrite existing values with blank entries except some technical fields
$keep = ['batch', 'notify', 'poll', 'request', 'confirm', 'poco', 'baseurl'];

View file

@ -2044,7 +2044,7 @@ class Item
// Remove the scheme to make sure that "https" and "http" doesn't make a difference
unset($parsed['scheme']);
$hostPart = $host ?? $parsed['host'] ?? '';
$hostPart = $host ?: $parsed['host'] ?? '';
if (!$hostPart) {
Logger::warning('Empty host GUID part', ['uri' => $uri, 'host' => $host, 'parsed' => $parsed, 'callstack' => System::callstack(10)]);
}