Code

Refactor setup.py.
[roundup.git] / templates / classic / detectors / messagesummary.py
1 #$Id: messagesummary.py,v 1.2 2007-04-03 06:47:21 a1s Exp $
3 from roundup.mailgw import parseContent
5 def summarygenerator(db, cl, nodeid, newvalues):
6     ''' If the message doesn't have a summary, make one for it.
7     '''
8     if newvalues.has_key('summary') or not newvalues.has_key('content'):
9         return
11     summary, content = parseContent(newvalues['content'], config=db.config)
12     newvalues['summary'] = summary
15 def init(db):
16     # fire before changes are made
17     db.msg.audit('create', summarygenerator)
19 # vim: set filetype=python ts=4 sw=4 et si