Update (rss): block links that have less then 250 words

This commit is contained in:
2023-11-29 11:55:44 +08:00
parent 1093908558
commit ff7ff9309d
2 changed files with 22 additions and 0 deletions

View File

@@ -18,6 +18,14 @@ public static function handle(int $rss_post_id)
return;
}
if (count_words($rss_post->body) < 250)
{
$rss_post->status = 'blocked';
$rss_post->save();
return;
}
if (in_array($rss_post->status, ['blocked', 'trashed'])) {
return;
}