Automated Messages (mostly) don't respect is_active, default
Many automated messages (unsubscribe, resubscribe, etc.) ignore the "is_default" and "is_active" flags on civicrm_mailing_component
.
Steps to Replicate
- Go to Mailings » Headers, Footers, Automated Messages.
- Disable the Unsubscribe message.
- Unsubscribe from a mailing.
Expected Behavior
No email.
Actual Behavior
Email.
Once I dug in, I saw that some code was filtering for is_active/is_default, but the copy/paste nature meant most weren't. I refactored the automated messages to take advantage of a common retrieval function.