From 68cfa12f1ed33f8db94604adbee59ca3ed4f97af Mon Sep 17 00:00:00 2001 From: wrongecho Date: Sat, 14 Dec 2024 17:31:06 +0000 Subject: [PATCH] Anonymous/Guest tickets - Add the anon email as a watcher --- cron_ticket_email_parser.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cron_ticket_email_parser.php b/cron_ticket_email_parser.php index 72618368a..e8b3e6376 100644 --- a/cron_ticket_email_parser.php +++ b/cron_ticket_email_parser.php @@ -147,6 +147,11 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date } } + // Guest ticket watchers + if ($client_id == 0) { + mysqli_query($mysqli, "INSERT INTO ticket_watchers SET watcher_email = '$contact_email_esc', watcher_ticket_id = $id"); + } + $data = []; if ($config_ticket_client_general_notifications == 1) { $subject_email = "Ticket created - [$config_ticket_prefix$ticket_number] - $subject"; @@ -162,7 +167,7 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date } if ($config_ticket_new_ticket_notification_email) { - if ($client_id == 0){ + if ($client_id == 0) { $client_name = "Guest"; } else { $client_sql = mysqli_query($mysqli, "SELECT client_name FROM clients WHERE client_id = $client_id");