Update: 2026-07-06 00:18:03
This commit is contained in:
@@ -151,6 +151,14 @@ try {
|
||||
break;
|
||||
}
|
||||
|
||||
// 0. Duplicate Check (Prevent commenting on the same post twice)
|
||||
$stmtCheck = $con->prepare("SELECT id FROM social_tasks WHERE target_url = ?");
|
||||
$stmtCheck->execute([$targetUrl]);
|
||||
if ($stmtCheck->fetch()) {
|
||||
echo json_encode(['status' => 'error', 'message' => 'Post already processed by another device']);
|
||||
break;
|
||||
}
|
||||
|
||||
// 1. Resolve Device ID
|
||||
$stmtDev = $con->prepare("SELECT id FROM social_accounts WHERE device_id = ?");
|
||||
$stmtDev->execute([$deviceId]);
|
||||
@@ -176,7 +184,8 @@ try {
|
||||
|
||||
// 2. Generate Immediate Comment
|
||||
require_once __DIR__ . '/gemini_comment_generator.php';
|
||||
$generatedComment = generateCommentWithGemini($postText, 'promote_siro');
|
||||
// Use soft promotion since the app isn't fully launched
|
||||
$generatedComment = generateCommentWithGemini($postText, 'soft_promote_siro');
|
||||
|
||||
// 3. Save this initial organic action to database as completed
|
||||
$stmt = $con->prepare("
|
||||
|
||||
Reference in New Issue
Block a user