mirror of
https://github.com/penpot/penpot.git
synced 2026-11-06 01:50:39 +00:00
* ✨ Render email templates inside the mail job The web process rendered each email to full subject and HTML body before submitting it, so every queued job carried a huge params payload. The queue now stores only the template id plus the raw template data, and the new :send-templated-mail job renders and sends the email inside the worker. The old :sendmail job stays in place to drain jobs submitted in the previous format; the quota notice and the REPL test mail keep using it. All templated callers (auth, profile, feedback, invitations, comments, Nitrate) submit recipes through eml/send-template. Closes #12445 AI-assisted-by: muse-spark-1.3-contributor * ♻️ Unify templated mail on template id strings The ::eml/template value was a namespaced keyword whose name had to match the registry key, with one live mismatch (user-feedback vs feedback). Callers now pass the registry id string itself, so keys stay ::eml/-namespaced and values stay plain data, and the single templates set rejects unsendable mail both at submit and in the worker. Closes #12445 AI-assisted-by: muse-spark-1.3-contributor * 🐛 Encode templated mail data with the template schema The job params column is plain JSON, so the URIs of an organization (:logo, :avatar-bg-url) were stored as record maps and the template check rejected them in the worker. Invites for organization teams, organization invites and renewal notices failed without a retry. Each registry entry now carries the JSON encoder and decoder of its template schema: send-template encodes the data before submit and the worker decodes it before rendering. The job schema keeps only the mail envelope, as the template schemas own the typed data. Closes #12445 AI-assisted-by: claude-opus-5-5 ---------