Edgewall Software

Ticket #2766: notification.patch

File notification.patch, 1.1 KB (added by wfragg@…, 6 years ago)

Possible fix

  • trac/ticket/notification.py

     
    178178        toemails = [] 
    179179        ccemails = [] 
    180180        for recipient in torecipients: 
    181             if recipient.find('@') >= 0: 
     181                if self.email_map.has_key(recipient): 
     182                toemails.append(self.email_map[recipient]) 
     183            elif recipient.find('@') >= 0: 
    182184                toemails.append(recipient) 
    183             elif self.email_map.has_key(recipient): 
    184                 toemails.append(self.email_map[recipient]) 
    185185        for recipient in ccrecipients: 
    186             if recipient.find('@') >= 0: 
     186                if self.email_map.has_key(recipient): 
     187                ccemails.append(self.email_map[recipient]) 
     188            elif recipient.find('@') >= 0: 
    187189                ccemails.append(recipient) 
    188             elif self.email_map.has_key(recipient): 
    189                 ccemails.append(self.email_map[recipient]) 
    190190 
    191191        # Remove duplicates 
    192192        toresult = []