mirror of
https://github.com/friendica/friendica
synced 2025-05-11 20:24:16 +02:00
Merge pull request #9440 from annando/one-click-follow
Follow/Unfollow contact with a single click
This commit is contained in:
commit
4719af6724
6 changed files with 86 additions and 72 deletions
|
@ -942,9 +942,9 @@ class Contact
|
|||
$unfollow_link = '';
|
||||
if (!$contact['self'] && in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
|
||||
if ($contact['uid'] && in_array($contact['rel'], [self::SHARING, self::FRIEND])) {
|
||||
$unfollow_link = 'unfollow?url=' . urlencode($contact['url']);
|
||||
$unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1';
|
||||
} elseif(!$contact['pending']) {
|
||||
$follow_link = 'follow?url=' . urlencode($contact['url']);
|
||||
$follow_link = 'follow?url=' . urlencode($contact['url']) . '&auto=1';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -322,9 +322,9 @@ class Profile
|
|||
}
|
||||
} elseif ($profile_is_native) {
|
||||
if ($visitor_is_following) {
|
||||
$unfollow_link = $visitor_base_path . '/unfollow?url=' . urlencode($profile_url);
|
||||
$unfollow_link = $visitor_base_path . '/unfollow?url=' . urlencode($profile_url) . '&auto=1';
|
||||
} else {
|
||||
$follow_link = $visitor_base_path .'/follow?url=' . urlencode($profile_url);
|
||||
$follow_link = $visitor_base_path .'/follow?url=' . urlencode($profile_url) . '&auto=1';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue