From: Hypolite Petovan Date: Sun, 26 Sep 2021 14:34:31 +0000 (-0400) Subject: [twitter] Add data to the unfollow hook result key X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=250dafd2b67f9b8b59bcdfc6058ff68bdd2c330f;p=friendica-addons.git [twitter] Add data to the unfollow hook result key --- diff --git a/twitter/twitter.php b/twitter/twitter.php index 948de3ba..f8da6cc4 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -197,8 +197,10 @@ function twitter_unfollow(App $a, array &$hook_data) $connection = new TwitterOAuth($ckey, $csecret, $otoken, $osecret); $result = $connection->post('friendships/destroy', ['screen_name' => $contact['nick']]); Logger::info('[twitter] API call "friendship/destroy" successful', ['result' => $result]); + $hook_data['result'] = true; } catch(Exception $e) { Logger::notice('[twitter] API call "friendships/destroy" failed', ['uid' => $uid, 'url' => $contact['url'], 'exception' => $e]); + $hook_data['result'] = false; } }