Support tickets are members-only (Marty 2026-10-24, after a throwaway-address 'pentest' ticket IAP-1012): signed-out support form + chatbot handoff need an email that belongs to an account on this site; inbound email opens NEW tickets only for member emails (replies to existing tickets still land)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-24 11:36:17 -05:00
parent 13f3ff56f8
commit 962cdf08b5
3 changed files with 12 additions and 4 deletions
+1
View File
@@ -362,6 +362,7 @@ async function ingestEmail(e) {
if (!ticketId) { const r = parseRef(e.subject); if (r) { const t = await byRef(r.ref); if (t && t.email === from) ticketId = t.id; } }
const body = clean(e.text, 5000);
if (ticketId) { const r = await addMessage(ticketId, { author: 'member', body, emailMessageId: mid, via: 'email' }); return Object.assign(r, { created: false }); }
if (e.canOpen && !(await e.canOpen(from))) return { error: 'not a member (new tickets need a platform account)', created: false }; // replies above still land
const r = await create({ platform: e.platform || 'iap', source: 'email', email: from, name: e.name, subject: oneLine(e.subject, 140) || '(no subject)', category: 'Other', body, emailMessageId: mid, via: 'email', confirm: !!e.confirm });
return Object.assign(r, { created: true });
}