forked from friendica/friendica-addons
[twitter] Fix typo, improve formatting in twitter_unfollow()
This commit is contained in:
parent
250dafd2b6
commit
31dd9f8e22
|
@ -177,7 +177,7 @@ function twitter_follow(App $a, array &$contact)
|
||||||
function twitter_unfollow(App $a, array &$hook_data)
|
function twitter_unfollow(App $a, array &$hook_data)
|
||||||
{
|
{
|
||||||
$contact = $hook_data['contact'];
|
$contact = $hook_data['contact'];
|
||||||
if ($contact['netword'] !== Protocol::TWITTER) {
|
if ($contact['network'] !== Protocol::TWITTER) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ function twitter_unfollow(App $a, array &$hook_data)
|
||||||
$result = $connection->post('friendships/destroy', ['screen_name' => $contact['nick']]);
|
$result = $connection->post('friendships/destroy', ['screen_name' => $contact['nick']]);
|
||||||
Logger::info('[twitter] API call "friendship/destroy" successful', ['result' => $result]);
|
Logger::info('[twitter] API call "friendship/destroy" successful', ['result' => $result]);
|
||||||
$hook_data['result'] = true;
|
$hook_data['result'] = true;
|
||||||
} catch(Exception $e) {
|
} catch (Exception $e) {
|
||||||
Logger::notice('[twitter] API call "friendships/destroy" failed', ['uid' => $uid, 'url' => $contact['url'], 'exception' => $e]);
|
Logger::notice('[twitter] API call "friendships/destroy" failed', ['uid' => $uid, 'url' => $contact['url'], 'exception' => $e]);
|
||||||
$hook_data['result'] = false;
|
$hook_data['result'] = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue