mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:10:14 +00:00
Enable "magic" with Hubzilla
This commit is contained in:
parent
5751311e99
commit
dca93a9606
8 changed files with 115 additions and 79 deletions
|
@ -3580,15 +3580,19 @@ class Contact
|
|||
return $destination;
|
||||
}
|
||||
|
||||
if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'stay_local') && ($url == '')) {
|
||||
return 'contact/' . $contact['id'] . '/conversations';
|
||||
}
|
||||
|
||||
if (Strings::compareLink($contact['url'], $url) || Strings::compareLink($contact['alias'], $url)) {
|
||||
$url = '';
|
||||
}
|
||||
|
||||
// Only redirections to the same host do make sense
|
||||
if (($url != '') && (parse_url($url, PHP_URL_HOST) != parse_url($contact['url'], PHP_URL_HOST))) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'stay_local') && ($url == '')) {
|
||||
return 'contact/' . $contact['id'] . '/conversations';
|
||||
}
|
||||
|
||||
if (!empty($contact['network']) && $contact['network'] != Protocol::DFRN) {
|
||||
return $destination;
|
||||
}
|
||||
|
@ -3599,7 +3603,7 @@ class Contact
|
|||
|
||||
$redirect = 'contact/redir/' . $contact['id'];
|
||||
|
||||
if (($url != '') && !Strings::compareLink($contact['url'], $url)) {
|
||||
if ($url != '') {
|
||||
$redirect .= '?url=' . $url;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue