Upload via GUI (267 Dateien)

This commit is contained in:
2026-10-19 18:05:55 +00:00
parent 1b29349219
commit f3e53e6182
9 changed files with 308 additions and 31 deletions
+6 -3
View File
@@ -316,6 +316,7 @@ function fetch_emails_for_account(PDO $pdo, array $account, bool $verbose): arra
log_activity($pdo, $ticketId, null, 'Ticket-Regel angewendet: ' . implode(', ', $ruleResult['matched_rules']));
}
apply_auto_reply($pdo, $ticketId, $ruleResult['auto_reply']);
$closedByRule = apply_rule_close($pdo, $ticketId, $ruleResult);
$deptStmt = $pdo->prepare('SELECT name, email FROM departments WHERE id = ?');
$deptStmt->execute([$defaultDeptId]);
@@ -328,9 +329,11 @@ function fetch_emails_for_account(PDO $pdo, array $account, bool $verbose): arra
'department_id' => $defaultDeptId,
'department_name' => $dept['name'] ?? null,
];
notify_new_ticket_channels($ticketForNotify, $dept['email'] ?? null);
notify_staff_new_ticket($ticketForNotify);
webhook_dispatch($pdo, 'ticket.created', $ticketId);
if (!$closedByRule) {
notify_new_ticket_channels($ticketForNotify, $dept['email'] ?? null);
notify_staff_new_ticket($ticketForNotify);
webhook_dispatch($pdo, 'ticket.created', $ticketId);
}
handle_after_fetch($mbox, $emailNum, $afterFetch, $archiveFolder);
$processed++;