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
|
@ -479,6 +479,22 @@ Hook data:
|
|||
- **uid** (input): the user to return the contact data for (can be empty for public contacts).
|
||||
- **result** (output): Set by the hook function to indicate a successful detection.
|
||||
|
||||
### support_follow
|
||||
|
||||
Called to assert whether a connector addon provides follow capabilities.
|
||||
|
||||
Hook data:
|
||||
- **protocol** (input): shorthand for the protocol. List of values is available in `src/Core/Protocol.php`.
|
||||
- **result** (output): should be true if the connector provides follow capabilities, left alone otherwise.
|
||||
|
||||
### support_revoke_follow
|
||||
|
||||
Called to assert whether a connector addon provides follow revocation capabilities.
|
||||
|
||||
Hook data:
|
||||
- **protocol** (input): shorthand for the protocol. List of values is available in `src/Core/Protocol.php`.
|
||||
- **result** (output): should be true if the connector provides follow revocation capabilities, left alone otherwise.
|
||||
|
||||
### follow
|
||||
|
||||
Called before adding a new contact for a user to handle non-native network remote contact (like Twitter).
|
||||
|
@ -497,6 +513,14 @@ Hook data:
|
|||
- **two_way** (input): wether to stop sharing with the remote contact as well.
|
||||
- **result** (output): wether the unfollowing is successful or not.
|
||||
|
||||
### revoke_follow
|
||||
|
||||
Called when making a remote contact on a non-native network (like Twitter) unfollow you.
|
||||
|
||||
Hook data:
|
||||
- **contact** (input): the remote contact (uid = local revoking user id) array.
|
||||
- **result** (output): a boolean value indicating wether the operation was successful or not.
|
||||
|
||||
## Complete list of hook callbacks
|
||||
|
||||
Here is a complete list of all hook callbacks with file locations (as of 24-Sep-2018). Please see the source for details of any hooks not documented above.
|
||||
|
@ -751,7 +775,11 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
|
|||
|
||||
### src/Core/Protocol.php
|
||||
|
||||
Hook::callAll('support_follow', $hook_data);
|
||||
Hook::callAll('support_revoke_follow', $hook_data);
|
||||
Hook::callAll('unfollow', $hook_data);
|
||||
Kook::callAll('revoke_follow', $hook_data);
|
||||
|
||||
### src/Core/StorageManager
|
||||
|
||||
Hook::callAll('storage_instance', $data);
|
||||
|
|
|
@ -414,7 +414,12 @@ Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 01-Ap
|
|||
Hook::callAll('logged_in', $a->user);
|
||||
|
||||
### src/Core/Protocol.php
|
||||
|
||||
Hook::callAll('support_follow', $hook_data);
|
||||
Hook::callAll('support_revoke_follow', $hook_data);
|
||||
Hook::callAll('unfollow', $hook_data);
|
||||
Kook::callAll('revoke_follow', $hook_data);
|
||||
|
||||
### src/Core/StorageManager
|
||||
|
||||
Hook::callAll('storage_instance', $data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue