mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
parent
cca11174e1
commit
8ffc002e53
@ -363,16 +363,6 @@ EOD
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cleanedTweet = nl2br($tweet->text);
|
|
||||||
//Debug::log('cleanedTweet: ' . $cleanedTweet);
|
|
||||||
|
|
||||||
// Perform optional keyword filtering (only keep tweet if keyword is found)
|
|
||||||
if (! empty($tweetFilter)) {
|
|
||||||
if (stripos($cleanedTweet, $this->getInput('filter')) === false) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize empty array to hold feed item values
|
// Initialize empty array to hold feed item values
|
||||||
$this->item = [];
|
$this->item = [];
|
||||||
|
|
||||||
@ -434,7 +424,17 @@ EOD
|
|||||||
. ' (@'
|
. ' (@'
|
||||||
. $this->item['username'] . ')';
|
. $this->item['username'] . ')';
|
||||||
|
|
||||||
// (Optional) Skip non-media tweet
|
$cleanedTweet = nl2br($tweet->text);
|
||||||
|
//Debug::log('cleanedTweet: ' . $cleanedTweet);
|
||||||
|
|
||||||
|
// Perform optional keyword filtering (only keep tweet if keyword is found)
|
||||||
|
if (! empty($tweetFilter)) {
|
||||||
|
if (stripos($cleanedTweet, $this->getInput('filter')) === false) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Perform optional non-media tweet skip
|
||||||
// This check must wait until after retweets are identified
|
// This check must wait until after retweets are identified
|
||||||
if (
|
if (
|
||||||
$onlyMediaTweets && !isset($tweet->attachments->media_keys) &&
|
$onlyMediaTweets && !isset($tweet->attachments->media_keys) &&
|
||||||
@ -458,8 +458,12 @@ EOD
|
|||||||
$titleText = strip_tags($cleanedTweet);
|
$titleText = strip_tags($cleanedTweet);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isRetweet && substr($titleText, 0, 4) === 'RT @') {
|
if ($isRetweet) {
|
||||||
$titleText = substr_replace($titleText, ':', 2, 0);
|
if (substr($titleText, 0, 4) === 'RT @') {
|
||||||
|
$titleText = substr_replace($titleText, ':', 2, 0);
|
||||||
|
} else {
|
||||||
|
$titleText = 'RT: @' . $this->item['username'] . ': ' . $titleText;
|
||||||
|
}
|
||||||
} elseif ($isReply && !$idAsTitle) {
|
} elseif ($isReply && !$idAsTitle) {
|
||||||
$titleText = 'R: ' . $titleText;
|
$titleText = 'R: ' . $titleText;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user