Skip to content

Commit 864e2e2

Browse files
author
Ralf Schlatterbeck
committed
Allow to specify additional cc and bcc emails (not roundup users)...
...for nosymessage used by the nosyreaction reactor.
1 parent 4c9e35e commit 864e2e2

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Richard Jones did the change.
77
Features:
88

99
- Norwegian Bokmal translation by Christian Aastorp
10+
- Allow to specify additional cc and bcc emails (not roundup users) for
11+
nosymessage used by the nosyreaction reactor.
1012

1113
2011-05-13 1.4.17 (r4605)
1214

roundup/roundupdb.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def addmessage(self, issueid, summary, text):
194194
"""
195195

196196
def nosymessage(self, issueid, msgid, oldvalues, whichnosy='nosy',
197-
from_address=None, cc=[], bcc=[]):
197+
from_address=None, cc=[], bcc=[], cc_emails = [], bcc_emails = []):
198198
"""Send a message to the members of an issue's nosy list.
199199
200200
The message is sent only to users on the nosy list who are not
@@ -213,6 +213,12 @@ def nosymessage(self, issueid, msgid, oldvalues, whichnosy='nosy',
213213
message to that may not be specified in the message's recipients
214214
list. These recipients will not be included in the To: or Cc:
215215
address lists.
216+
217+
The cc_emails and bcc_emails arguments take a list of additional
218+
recipient email addresses (just the mail address not roundup users)
219+
this can be useful for sending to additional email addresses which are no
220+
roundup users. These arguments are currently not used by roundups
221+
nosyreaction but can be used by customized (nosy-)reactors.
216222
"""
217223
if msgid:
218224
authid = self.db.msg.get(msgid, 'author')
@@ -267,11 +273,13 @@ def good_recipient(userid):
267273
for userid in cc + self.get(issueid, whichnosy):
268274
if good_recipient(userid):
269275
add_recipient(userid, sendto)
276+
sendto.extend (cc_emails)
270277

271278
# now deal with bcc people.
272279
for userid in bcc:
273280
if good_recipient(userid):
274281
add_recipient(userid, bcc_sendto)
282+
bcc_sendto.extend (bcc_emails)
275283

276284
if oldvalues:
277285
note = self.generateChangeNote(issueid, oldvalues)

0 commit comments

Comments
 (0)