Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 28 additions & 13 deletions src/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,20 +315,35 @@ export const triggerAuditForSite = async (
slackContext,
lambdaContext,
auditContext = {},
) => sendAuditMessage(
lambdaContext.sqs,
lambdaContext.env.AUDIT_JOBS_QUEUE_URL,
auditType,
{
slackContext: {
channelId: slackContext.channelId,
threadTs: slackContext.threadTs,
) => {
// Temporary diagnostic — confirms slackContext is being forwarded onto the
// audit-worker SQS message. Logs channel + thread presence (not the values
// themselves, to avoid leaking IDs into long-lived logs). Remove once the
// Slack-from-audit-worker flow is verified working end-to-end.
if (lambdaContext?.log?.info) {
lambdaContext.log.info('[slack-debug][trigger-audit] dispatching to AUDIT_JOBS_QUEUE_URL', {
auditType,
siteId: site.getId(),
queueUrl: lambdaContext.env?.AUDIT_JOBS_QUEUE_URL,
hasChannelId: !!slackContext?.channelId,
hasThreadTs: !!slackContext?.threadTs,
});
}
return sendAuditMessage(
lambdaContext.sqs,
lambdaContext.env.AUDIT_JOBS_QUEUE_URL,
auditType,
{
slackContext: {
channelId: slackContext.channelId,
threadTs: slackContext.threadTs,
},
...auditContext,
},
...auditContext,
},
site.getId(),
auditData,
);
site.getId(),
auditData,
);
};

/**
* Triggers the A11y codefix flow for an existing opportunity.
Expand Down
Loading