mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-24 16:03:40 +00:00
Merge pull request #1169 from nupplaphil/bug/notices
[twitter] Fix Notice
This commit is contained in:
commit
a1c91dbd27
1 changed files with 1 additions and 2 deletions
|
@ -497,12 +497,12 @@ function twitter_action(App $a, $uid, $pid, $action)
|
|||
$post = ['id' => $pid];
|
||||
|
||||
Logger::debug('before action', ['action' => $action, 'pid' => $pid, 'data' => $post]);
|
||||
$result = [];
|
||||
|
||||
try {
|
||||
switch ($action) {
|
||||
case 'delete':
|
||||
// To-Do: $result = $connection->post('statuses/destroy', $post);
|
||||
$result = [];
|
||||
break;
|
||||
case 'like':
|
||||
$result = $connection->post('favorites/create', $post);
|
||||
|
@ -518,7 +518,6 @@ function twitter_action(App $a, $uid, $pid, $action)
|
|||
break;
|
||||
default:
|
||||
Logger::warning('Unhandled action', ['action' => $action]);
|
||||
$result = [];
|
||||
}
|
||||
} catch (TwitterOAuthException $twitterOAuthException) {
|
||||
Logger::warning('Unable to communicate with twitter', ['action' => $action, 'data' => $post, 'code' => $twitterOAuthException->getCode(), 'exception' => $twitterOAuthException]);
|
||||
|
|
Loading…
Reference in a new issue