From d37f77990807fe03116a82785b20ab296bef0dd5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 9 Oct 2021 01:58:37 -0400 Subject: [PATCH] [twitter] Mirror the Twitter block behavior concerning established relationships --- twitter/twitter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/twitter/twitter.php b/twitter/twitter.php index 6a4df877..c443f0c2 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -176,6 +176,11 @@ function twitter_unfollow(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']); + + 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) -- 2.39.5