Added proper enabling and disabling of sending RTs to Twitter.

This commit is contained in:
Neil E. Hodges
2016-03-19 03:23:26 -07:00
committed by root
parent 14cb2d5398
commit 39ebb64b85
6 changed files with 27 additions and 5 deletions

View File

@@ -111,7 +111,14 @@ function is_twitter_bound($notice, $flink) {
return false;
}
$allowedVerbs = array(ActivityVerb::POST, ActivityVerb::SHARE);
$allowedVerbs = array(ActivityVerb::POST);
// Default behavior: always send repeats
if (empty($flink))
array_push($allowedVerbs, ActivityVerb::SHARE);
// Otherwise, check to see if repeats are allowed
else if (($flink->noticesync & FOREIGN_NOTICE_SEND_REPEAT) == FOREIGN_NOTICE_SEND_REPEAT)
array_push($allowedVerbs, ActivityVerb::SHARE);
// Don't send things that aren't posts or repeats (at least for now)
if (!in_array($notice->verb, $allowedVerbs)) {