Update (copies)

This commit is contained in:
2023-12-03 11:20:03 +08:00
parent 97dc13e785
commit 38c53b4045
13 changed files with 103 additions and 104 deletions

View File

@@ -28,7 +28,6 @@ public static function handle(int $rss_post_id)
$final_content = "TITLE: {$rss_post->title}";
if (in_array($rss_post->status, ['blocked', 'trashed'])) {
return;
}
@@ -160,12 +159,9 @@ 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)
{
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
@@ -182,9 +178,8 @@ public static function handle(int $rss_post_id)
}
if (count($words_to_save) <= 0)
{
$rss_post->status = 'blocked';
if (count($words_to_save) <= 0) {
$rss_post->status = 'blocked';
}
if ($rss_post->save()) {