feat: integrate WAHA WhatsApp notifications for tasks, notes, and passwords with admin configuration settings

This commit is contained in:
root
2026-03-29 16:42:30 +07:00
parent 8dedb57692
commit dbe02e52fd
7 changed files with 105 additions and 6 deletions

View File

@@ -39,6 +39,8 @@ if ($action === 'api') {
$status = $_POST['status'] ?? null;
$stmt = $pdo->prepare("UPDATE tasks SET status = ?, status_updated_at = CURRENT_TIMESTAMP WHERE id = ?");
$stmt->execute([$status, $task_id]);
$task_to_upd = query("SELECT title FROM tasks WHERE id=?", [$task_id])->fetch();
if($task_to_upd) notify_waha('Moved to '.$status, 'Task Status', $task_to_upd['title']);
echo json_encode(['status'=>'ok']);
exit;
}