Fixing a bug in the updated emailing system: induction emails had type "send_induction_acceptance" and we were only allowing one email per type per person.. but each person can be inducted on more than one tool! Oops.
Changes:
Induction email "types" are now "inducted_on|<id of tool>", so we can have one email per person per tool
the templates got renamed to "inducted_on" (as the type field is max 50 chars)
the template path is extracted from the "type" passed to create_communication (string before the | character)
The bot now has a "resend_inductions" command, with no parameters this will find all "pending acceptance induction"s for the caller, create communications for them, and send them (no restrictions!)
resend_inductions can also take a member name argument, if so it will send any pending inductions for the member named, only if those havent been sent in the last week already (stopping spamming, plus we have restricted free email sends with brevo!)
Fixing a bug in the updated emailing system: induction emails had type "send_induction_acceptance" and we were only allowing one email per type per person.. but each person can be inducted on more than one tool! Oops.
Changes: