Ensure url property of Probe::uri result is used authoritatively

- Some profile URLs aren't canonical and need to be updated during probe
This commit is contained in:
Hypolite Petovan 2020-06-24 20:57:47 -04:00
parent abd5b2a881
commit 50d05cec83
8 changed files with 16 additions and 20 deletions

View file

@ -1829,11 +1829,12 @@ class OStatus
$item["private"] = Item::PRIVATE;
$contact = Probe::uri($item['follow']);
$item['follow'] = $contact['url'];
if ($contact['alias'] == '') {
$contact['alias'] = $contact["url"];
} else {
if ($contact['alias']) {
$item['follow'] = $contact['alias'];
} else {
$contact['alias'] = $contact['url'];
}
$condition = ['uid' => $owner['uid'], 'nurl' => Strings::normaliseLink($contact["url"])];