mirror of
https://github.com/friendica/friendica
synced 2025-04-27 12:30:11 +00:00
Create Contact\Unfollow module class
This commit is contained in:
parent
a1e6e13a9f
commit
58d6e7e2bb
5 changed files with 189 additions and 4 deletions
|
@ -1176,7 +1176,7 @@ class Contact
|
|||
$unfollow_link = '';
|
||||
if (!$contact['self'] && Protocol::supportsFollow($contact['network'])) {
|
||||
if ($contact['uid'] && in_array($contact['rel'], [self::SHARING, self::FRIEND])) {
|
||||
$unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1';
|
||||
$unfollow_link = 'contact/unfollow?url=' . urlencode($contact['url']) . '&auto=1';
|
||||
} elseif(!$contact['pending']) {
|
||||
$follow_link = 'follow?url=' . urlencode($contact['url']) . '&auto=1';
|
||||
}
|
||||
|
|
|
@ -339,9 +339,9 @@ class Profile
|
|||
}
|
||||
} else {
|
||||
if ($visitor_is_following) {
|
||||
$unfollow_link = $visitor_base_path . '/unfollow?url=' . urlencode($profile_url) . '&auto=1';
|
||||
$unfollow_link = $visitor_base_path . '/contact/unfollow?url=' . urlencode($profile_url) . '&auto=1';
|
||||
} else {
|
||||
$follow_link = $visitor_base_path .'/follow?url=' . urlencode($profile_url) . '&auto=1';
|
||||
$follow_link = $visitor_base_path . '/follow?url=' . urlencode($profile_url) . '&auto=1';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue