feat: integrate WAHA WhatsApp notifications for tasks, notes, and passwords with admin configuration settings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user