Add (political checks)

This commit is contained in:
2023-11-28 19:32:42 +08:00
parent 50dce76e55
commit 21ae20a600
10 changed files with 66 additions and 2 deletions

View File

@@ -147,6 +147,28 @@ public static function handle(int $rss_post_id)
$rss_post->status = 'published';
}
if (!$rss_post->status != 'blocked')
{
if (isset($post_meta_response->output->is_ai_or_tech_news))
{
if ($post_meta_response->output->is_ai_or_tech_news != true)
{
$rss_post->status = 'blocked';
}
else
{
if (isset($post_meta_response->output->is_government_or_political_news))
{
if($post_meta_response->output->is_ai_or_tech_news == true)
{
$rss_post->status = 'blocked';
}
}
}
}
}
if ($rss_post->save()) {
if ($rss_post->status == 'published') {