diff options
| -rw-r--r-- | src/mailman/email/message.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mailman/email/message.py b/src/mailman/email/message.py index 7c811d797..786dc11d0 100644 --- a/src/mailman/email/message.py +++ b/src/mailman/email/message.py @@ -132,7 +132,7 @@ class UserNotification(Message): self['To'] = recipients self.recipients = set([recipients]) - def send(self, mlist, add_precedence=True, tomoderators=False, **_kws): + def send(self, mlist, *, add_precedence=True, to_moderators=False, **_kws): """Sends the message by enqueuing it to the 'virgin' queue. This is used for all internally crafted messages. @@ -142,6 +142,9 @@ class UserNotification(Message): :param add_precedence: Flag indicating whether a `Precedence: bulk` header should be added to the message or not. :type add_precedence: bool + :param to_moderators: Flag indicating whether the message should be + sent to the list's moderators instead of the list's membership. + :type to_moderators: bool This function also accepts arbitrary keyword arguments. The key/value pairs for **kws is added to the metadata dictionary associated with @@ -159,7 +162,7 @@ class UserNotification(Message): # don't override an existing Precedence: header. if 'precedence' not in self and add_precedence: self['Precedence'] = 'bulk' - if tomoderators: + if to_moderators: self.recipients = set( member.address.email for member in mlist.moderators.members |
