Added option to stay on the local machine when clicking on a contact link
This commit is contained in:
@@ -2578,7 +2578,7 @@ class Contact
|
||||
{
|
||||
$destination = $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
||||
|
||||
if (!Session::isAuthenticated() || ($contact['network'] != Protocol::DFRN)) {
|
||||
if (!Session::isAuthenticated()) {
|
||||
return $destination;
|
||||
}
|
||||
|
||||
@@ -2587,6 +2587,14 @@ class Contact
|
||||
return $url;
|
||||
}
|
||||
|
||||
if (DI::pConfig()->get(local_user(), 'system', 'stay_local') && ($url == '')) {
|
||||
return 'contact/' . $contact['id'] . '/conversations';
|
||||
}
|
||||
|
||||
if ($contact['network'] != Protocol::DFRN) {
|
||||
return $destination;
|
||||
}
|
||||
|
||||
if (!empty($contact['uid'])) {
|
||||
return self::magicLink($contact['url'], $url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user