At present, notification recipients are specified at notifier initialization time with either one of the WithRecipient or WithRecipients options. This is sufficient when the recipients are known ahead of time but does not accommodate other scenarios.
It is proposed to add a WithRecipientLookup option that sets a function to look up recipients given a site key and a Kind.
At present, notification recipients are specified at notifier initialization time with either one of the
WithRecipient
orWithRecipients
options. This is sufficient when the recipients are known ahead of time but does not accommodate other scenarios.It is proposed to add a
WithRecipientLookup
option that sets a function to look up recipients given a site key and aKind
.This will enable notify.Send to customize recipients according to the target site and/or notification kind.