Changeset 392


Ignore:
Timestamp:
07/12/10 13:17:22 (14 years ago)
Author:
bas
Message:

Do not check if notification is enabled. Trac will do the checking and determine it. Some plugins will override some settings, eg: announcerplugin. So we did not receive any notifications, see #199

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r390 r392  
    441441                        #       to_list.append(e)
    442442                               
    443                         # Remove reporter email address if notification is
    444                         # on
    445                         #
    446                         if self.notification:
    447                                 try:
    448                                         cc_addrs.remove((self.author, self.email_addr))
    449                                 except ValueError, detail:
    450                                         pass
     443                        # Always Remove reporter email address from cc-list
     444                        #
     445                        try:
     446                                cc_addrs.remove((self.author, self.email_addr))
     447                        except ValueError, detail:
     448                                pass
    451449
    452450                        for name,addr in cc_addrs:
     
    855853                       
    856854
    857                 if self.notification and not spam:
     855                if not spam:
    858856                        self.notify(tkt, False, when)
    859857
     
    10751073                                #print tkt.get_changelog(self.db, when)
    10761074
    1077                 if self.notification and not spam:
     1075                if not spam:
    10781076                        self.notify(tkt, True)
    10791077
     
    14481446                else:
    14491447                        spam_msg = False
    1450 
    1451                 if self.get_config('notification', 'smtp_enabled') in ['true']:
    1452                         self.notification = 1
    1453                 else:
    1454                         self.notification = 0
    14551448
    14561449                if not m['Subject']:
     
    19381931                A wrapper for the TRAC notify function. So we can use templates
    19391932                """
     1933                if self.VERBOSE:
     1934                        print "VB: notify()"
     1935
    19401936                if self.DRY_RUN:
    19411937                                print 'DRY_RUN: self.notify(tkt, True) reporter = %s' %tkt['reporter']
    19421938                                return
    19431939                try:
     1940
     1941                        #from trac.ticket.web_ui import TicketModule
     1942                        #from trac.ticket.notification import TicketNotificationSystem
     1943                        #ticket_sys = TicketNotificationSystem(self.env)
     1944                        #a = TicketModule(self.env)
     1945                        #print a.__dict__
     1946                        #tn_sys = TicketNotificationSystem(self.env)
     1947                        #print tn_sys
     1948                        #print tn_sys.__dict__
     1949                        #sys.exit(0)
     1950
    19441951                        # create false {abs_}href properties, to trick Notify()
    19451952                        #
     
    19471954                                self.env.abs_href = Href(self.get_config('project', 'url'))
    19481955                                self.env.href = Href(self.get_config('project', 'url'))
     1956
    19491957
    19501958                        tn = TicketNotifyEmail(self.env)
Note: See TracChangeset for help on using the changeset viewer.