1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: roundupdb.py,v 1.75 2002-12-11 01:52:20 richard Exp $
18+ # $Id: roundupdb.py,v 1.75.2.1 2003-04-27 02:29:07 richard Exp $
1919
2020__doc__ = """
2121Extending hyperdb with types specific to issue-tracking.
@@ -110,9 +110,16 @@ def nosymessage(self, nodeid, msgid, oldvalues):
110110
111111 # possibly send the message to the author, as long as they aren't
112112 # anonymous
113- if (self .db .config .MESSAGES_TO_AUTHOR == 'yes' and
114- users .get (authid , 'username' ) != 'anonymous' ):
115- sendto .append (authid )
113+ if (users .get (authid , 'username' ) != 'anonymous' and
114+ not r .has_key (authid )):
115+ if self .db .config .MESSAGES_TO_AUTHOR == 'yes' :
116+ # make sure they have an address
117+ add = users .get (authid , 'address' )
118+ if add :
119+ # send it to them
120+ sendto .append (add )
121+ recipients .append (authid )
122+
116123 r [authid ] = 1
117124
118125 # now figure the nosy people who weren't recipients
@@ -125,9 +132,12 @@ def nosymessage(self, nodeid, msgid, oldvalues):
125132 continue
126133 # make sure they haven't seen the message already
127134 if not r .has_key (nosyid ):
128- # send it to them
129- sendto .append (nosyid )
130- recipients .append (nosyid )
135+ # make sure they have an address
136+ add = users .get (nosyid , 'address' )
137+ if add :
138+ # send it to them
139+ sendto .append (add )
140+ recipients .append (nosyid )
131141
132142 # generate a change note
133143 if oldvalues :
@@ -137,9 +147,6 @@ def nosymessage(self, nodeid, msgid, oldvalues):
137147
138148 # we have new recipients
139149 if sendto :
140- # map userids to addresses
141- sendto = [users .get (i , 'address' ) for i in sendto ]
142-
143150 # update the message's recipients list
144151 messages .set (msgid , recipients = recipients )
145152
0 commit comments