mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-19 00:03:42 +00:00
Merge pull request #1237 from MrPetovan/task/10862-move-unfollow-worker
[twitter] Update unfollow and block hook functions after parameters have changed
This commit is contained in:
commit
7be6eb5d00
1 changed files with 3 additions and 3 deletions
|
@ -175,7 +175,7 @@ function twitter_follow(App $a, array &$contact)
|
||||||
|
|
||||||
function twitter_unfollow(App $a, array &$hook_data)
|
function twitter_unfollow(App $a, array &$hook_data)
|
||||||
{
|
{
|
||||||
$hook_data['result'] = twitter_api_contact('friendships/destroy', $hook_data['contact'], $hook_data['contact']['uid']);
|
$hook_data['result'] = twitter_api_contact('friendships/destroy', $hook_data['contact'], $hook_data['uid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
function twitter_block(App $a, array &$hook_data)
|
function twitter_block(App $a, array &$hook_data)
|
||||||
|
@ -183,8 +183,8 @@ 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) {
|
if ($hook_data['result'] === true) {
|
||||||
Contact::removeFollower($hook_data['contact']);
|
$cdata = Contact::getPublicAndUserContactID($hook_data['contact']['id'], $hook_data['uid']);
|
||||||
Contact::unfollow($hook_data['contact']['id'], $hook_data['uid']);
|
Contact::remove($cdata['user']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue