mirror of
https://github.com/friendica/friendica
synced 2025-04-19 05:50:10 +00:00
Add revoke follow feature
- Add new follow revoke module - Add new hooks: revoke_follow, support_follow, support_revoke_follow - Add link in contact page action menu
This commit is contained in:
parent
52b8cd054d
commit
72fae04e97
11 changed files with 272 additions and 16 deletions
|
@ -1148,6 +1148,16 @@ class Contact extends BaseModule
|
|||
];
|
||||
|
||||
if ($contact['uid'] != 0) {
|
||||
if (Protocol::supportsRevokeFollow($contact['network']) && in_array($contact['rel'], [Model\Contact::FOLLOWER, Model\Contact::FRIEND])) {
|
||||
$contact_actions['revoke_follow'] = [
|
||||
'label' => DI::l10n()->t('Revoke Follow'),
|
||||
'url' => 'contact/' . $contact['id'] . '/revoke',
|
||||
'title' => DI::l10n()->t('Revoke the follow from this contact'),
|
||||
'sel' => '',
|
||||
'id' => 'revoke_follow',
|
||||
];
|
||||
}
|
||||
|
||||
$contact_actions['delete'] = [
|
||||
'label' => DI::l10n()->t('Delete'),
|
||||
'url' => 'contact/' . $contact['id'] . '/drop?t=' . $formSecurityToken,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue