fix(coderd/notifications): exclude unset fields from notifications (#15110)

This PR will ensure that optional fields are ignored when they are unset
in user account related templates.
This commit is contained in:
Sas Swart
2024-10-16 21:53:24 +02:00
committed by GitHub
parent f537193682
commit dfb6bfa4d2
6 changed files with 90 additions and 12 deletions

View File

@ -24,6 +24,6 @@
},
"title": "User account \"bobby\" activated",
"title_markdown": "User account \"bobby\" activated",
"body": "Hi Bobby,\n\nUser account bobby has been activated.\n\nThe newly activated account belongs to William Tables and was activated by rob.",
"body_markdown": "Hi Bobby,\n\nUser account **bobby** has been activated.\n\nThe newly activated account belongs to **William Tables** and was activated by **rob**."
"body": "Hi Bobby,\n\nUser account bobby has been activated.\n\nThe account belongs to William Tables and it was activated by rob.",
"body_markdown": "Hi Bobby,\n\nUser account **bobby** has been activated.\n\nThe account belongs to **William Tables** and it was activated by **rob**."
}

View File

@ -24,6 +24,6 @@
},
"title": "User account \"bobby\" suspended",
"title_markdown": "User account \"bobby\" suspended",
"body": "Hi Bobby,\n\nUser account bobby has been suspended.\n\nThe newly suspended account belongs to William Tables and was suspended by rob.",
"body_markdown": "Hi Bobby,\n\nUser account **bobby** has been suspended.\n\nThe newly suspended account belongs to **William Tables** and was suspended by **rob**."
"body": "Hi Bobby,\n\nUser account bobby has been suspended.\n\nThe account belongs to William Tables and it was suspended by rob.",
"body_markdown": "Hi Bobby,\n\nUser account **bobby** has been suspended.\n\nThe account belongs to **William Tables** and it was suspended by **rob**."
}