mirror of
https://github.com/friendica/friendica
synced 2025-04-24 01:10:11 +00:00
Add follow/unfollow link to the contact actions menu
This commit is contained in:
parent
ae5dde9f5e
commit
d5b29b1c61
4 changed files with 25 additions and 1 deletions
|
@ -415,6 +415,24 @@ class Profile extends BaseModule
|
|||
|
||||
$formSecurityToken = self::getFormSecurityToken('contact_action');
|
||||
|
||||
if ($localRelationship->rel & Contact::SHARING) {
|
||||
$contact_actions['unfollow'] = [
|
||||
'label' => $this->t('Unfollow'),
|
||||
'url' => 'contact/unfollow?url=' . urlencode($contact['url']) . '&auto=1',
|
||||
'title' => '',
|
||||
'sel' => '',
|
||||
'id' => 'unfollow',
|
||||
];
|
||||
} else {
|
||||
$contact_actions['follow'] = [
|
||||
'label' => $this->t('Follow'),
|
||||
'url' => 'contact/follow?url=' . urlencode($contact['url']) . '&auto=1',
|
||||
'title' => '',
|
||||
'sel' => '',
|
||||
'id' => 'follow',
|
||||
];
|
||||
}
|
||||
|
||||
// Provide friend suggestion only for Friendica contacts
|
||||
if ($contact['network'] === Protocol::DFRN) {
|
||||
$contact_actions['suggest'] = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue