Put the reply text inside question notification emails

The notification only said that the school had answered and linked into
the LMS, so a student had to log in to read two lines. Delivered mail
plus an unread thread was the common outcome — one such thread was a
pre-sale question that never converted.

The mail now carries the answer itself (capped at 2000 chars, with a
pointer to the thread when longer or when files are attached). Quoted
blocks are HTML-escaped, which they were not before.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-23 13:41:33 +05:00
co-authored by Claude Fable 5
parent a92592ec63
commit 03aaec76c2
2 changed files with 31 additions and 5 deletions
@@ -78,6 +78,8 @@ export async function POST(
question.user.name,
question.title,
id,
text.trim(),
Boolean(safeFiles?.length),
);
} else {
const staff = await prisma.user.findMany({