mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-20 03:43:42 +00:00
[twitter] Mirror the Twitter block behavior concerning established relationships
This commit is contained in:
parent
52828b2b45
commit
d37f779908
1 changed files with 5 additions and 0 deletions
|
@ -176,6 +176,11 @@ function twitter_unfollow(App $a, array &$hook_data)
|
||||||
function twitter_block(App $a, array &$hook_data)
|
function twitter_block(App $a, array &$hook_data)
|
||||||
{
|
{
|
||||||
$hook_data['result'] = twitter_api_contact('blocks/create', $hook_data['contact'], $hook_data['uid']);
|
$hook_data['result'] = twitter_api_contact('blocks/create', $hook_data['contact'], $hook_data['uid']);
|
||||||
|
|
||||||
|
if ($hook_data['result'] === true) {
|
||||||
|
Contact::removeFollower($hook_data['contact']);
|
||||||
|
Contact::unfollow($hook_data['contact']['id'], $hook_data['uid']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function twitter_unblock(App $a, array &$hook_data)
|
function twitter_unblock(App $a, array &$hook_data)
|
||||||
|
|
Loading…
Reference in a new issue