[twitter] Mirror the Twitter block behavior concerning established relationships

pull/1186/head
Hypolite Petovan 2021-10-09 01:58:37 -04:00
parent 52828b2b45
commit d37f779908
1 changed files with 5 additions and 0 deletions

View File

@ -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)