fix: webhook paused email template broken rendering#11828
fix: webhook paused email template broken rendering#11828pmartin-dev wants to merge 1 commit intoappwrite:1.9.xfrom
Conversation
Greptile SummaryThis PR fixes broken rendering of the webhook-paused email notification by migrating Confidence Score: 5/5Safe to merge — the fix is a straightforward migration to an established pattern with no regressions introduced. The change is minimal and consistent with how Certificates.php and Migrations.php handle the same email flow. The Mails worker automatically injects {{host}}, {{heading}}, and {{year}}, so all previously broken placeholders are now correctly resolved. No logic is altered beyond the template rendering path. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/Appwrite/Platform/Workers/Webhooks.php | Refactors sendEmailAlert to use setBodyTemplate + setBody pattern; correctly resolves {{user}} per-iteration and delegates {{host}}/{{heading}} injection to the Mails worker. |
Reviews (1): Last reviewed commit: "fix: webhook paused email template broke..." | Re-trigger Greptile
What does this PR do?
Fixes #8931 — The webhook paused email notification was broken and rendered with
duplicated/malformed content.
Root causes:
{{subject}}and{{message}}were used instead of{{heading}}and{{body}}, so the content never rendered in the base styled templatetemplate instead of the base template
{{user}}was never resolved because the body was rendered before the user loop{{host}}was never set, breaking the "Webhook settings" linkFix: Migrated to
setBodyTemplate()pattern, consistent withCertificates.phpandMigrations.phpworkers (as the TODO comment on the removedline suggested).
Test Plan
buckets.*) and trigger them until retry threshold isexceeded
social links, and a working "Webhook settings" link
Related PRs and Issues
Checklist