Skip to content

Commit 3599e33

Browse files
committed
send_message allows setting message sender via authid.
Adapted from: http://hg.python.org/tracker/roundup/rev/ad317e38
1 parent 8fa76a4 commit 3599e33

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ Features:
161161
- extract translatable strings from devel and responsive templates. Merge
162162
translations from https://sourceforge.net/p/roundup/code/merge-requests/3/
163163
(John Rouillard. DE translations by Tobias Herp.)
164+
- send_message now allows setting authid to set source of email. (John Rouillard)
164165

165166
2020-07-13 2.0.0
166167

roundup/roundupdb.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def encrypt_to(self, message, sendto):
425425
return msg
426426

427427
def send_message(self, issueid, msgid, note, sendto, from_address=None,
428-
bcc_sendto=[], subject=None, crypt=False,
428+
bcc_sendto=[], authid=None, subject=None, crypt=False,
429429
add_headers={}):
430430
'''Actually send the nominated message from this issue to the sendto
431431
recipients, with the note appended. It's possible to add
@@ -457,7 +457,9 @@ def send_message(self, issueid, msgid, note, sendto, from_address=None,
457457
title = self.get(issueid, 'title') or '%s message copy' % cn
458458

459459
# figure author information
460-
if msgid:
460+
if authid:
461+
pass
462+
elif msgid:
461463
authid = messages.get(msgid, 'author')
462464
else:
463465
authid = self.db.getuid()

0 commit comments

Comments
 (0)