fix(23-06): wire auto_report webhook branch to autoPostAcknowledgment
Replace the unguarded generateAndPostAcknowledgment(campaignId) direct call in runGatedPhishingStages' auto_report branch with the idempotent autoPostAcknowledgment(campaignId, 'system:auto_report'). Closes CR-01 (23-REVIEW.md) / Truth #18 (23-VERIFICATION.md): a repeat ticket-create webhook joining an already-acknowledged USER_AWARENESS campaign now finds the persisted remediation_actions row and skips the re-post instead of re-sending the customer-visible thank-you note on every additional report.
This commit is contained in:
parent
c79af9b448
commit
13bf851ab5
1 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ import { groupReportIntoCampaign } from './campaign-grouping-service';
|
|||
import { getCompanyAutomationGate } from './phishing-automation-gate';
|
||||
import { parseAndStoreMessage } from './phishing-eml-service';
|
||||
import { classifyCampaign, Verdict } from './campaign-classifier';
|
||||
import { generateAndPostAcknowledgment } from './triage-note-service';
|
||||
import { autoPostAcknowledgment } from './remediation-service';
|
||||
|
||||
export class WebhookService {
|
||||
private _autotaskClient: AutotaskClient | null = null;
|
||||
|
|
@ -558,7 +558,7 @@ export class WebhookService {
|
|||
}
|
||||
|
||||
if (verdict === 'USER_AWARENESS') {
|
||||
await generateAndPostAcknowledgment(campaignId);
|
||||
await autoPostAcknowledgment(campaignId, 'system:auto_report');
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('[WEBHOOK] auto_report stage error', err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue