Merge pull request #1179 from MrPetovan/task/10739-twitter-block
[twitter] Comment out remote post deletion currently never triggered
This commit is contained in:
commit
107811903c
1 changed files with 13 additions and 4 deletions
|
@ -622,9 +622,14 @@ function twitter_post_hook(App $a, array &$b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($b['verb'] == Activity::POST) && $b['deleted']) {
|
/**
|
||||||
twitter_api_post('statuses/destroy', twitter_get_id($thr_parent['uri']), $b['uid']);
|
* @TODO This can't work at the moment:
|
||||||
}
|
* - Posts created on Friendica and mirrored to Twitter don't have a Twitter ID
|
||||||
|
* - Posts created on Twitter and mirrored on Friendica do not trigger the notifier hook this is part of.
|
||||||
|
*/
|
||||||
|
//if (($b['verb'] == Activity::POST) && $b['deleted']) {
|
||||||
|
// twitter_api_post('statuses/destroy', twitter_get_id($thr_parent['uri']), $b['uid']);
|
||||||
|
//}
|
||||||
|
|
||||||
if ($b['verb'] == Activity::LIKE) {
|
if ($b['verb'] == Activity::LIKE) {
|
||||||
Logger::info('Like', ['uid' => $b['uid'], 'id' => twitter_get_id($b["thr-parent"])]);
|
Logger::info('Like', ['uid' => $b['uid'], 'id' => twitter_get_id($b["thr-parent"])]);
|
||||||
|
@ -637,7 +642,11 @@ function twitter_post_hook(App $a, array &$b)
|
||||||
if ($b['verb'] == Activity::ANNOUNCE) {
|
if ($b['verb'] == Activity::ANNOUNCE) {
|
||||||
Logger::info('Retweet', ['uid' => $b['uid'], 'id' => twitter_get_id($b["thr-parent"])]);
|
Logger::info('Retweet', ['uid' => $b['uid'], 'id' => twitter_get_id($b["thr-parent"])]);
|
||||||
if ($b['deleted']) {
|
if ($b['deleted']) {
|
||||||
twitter_api_post('statuses/destroy', twitter_get_id($thr_parent['extid']), $b['uid']);
|
/**
|
||||||
|
* @TODO This can't work at the moment:
|
||||||
|
* - Twitter post reshare removal doesn't seem to trigger the notifier hook this is part of
|
||||||
|
*/
|
||||||
|
//twitter_api_post('statuses/destroy', twitter_get_id($thr_parent['extid']), $b['uid']);
|
||||||
} else {
|
} else {
|
||||||
twitter_retweet($b["uid"], twitter_get_id($b["thr-parent"]));
|
twitter_retweet($b["uid"], twitter_get_id($b["thr-parent"]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue