Premiere version : mise en route du suivi.
[auf_roundup.git] / share / roundup / templates / classic / detectors / messagesummary.py
1 #$Id: messagesummary.py,v 1.2 2007-04-03 06:47:21 a1s Exp $
2
3 from roundup.mailgw import parseContent
4
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
10
11 summary, content = parseContent(newvalues['content'], config=db.config)
12 newvalues['summary'] = summary
13
14
15 def init(db):
16 # fire before changes are made
17 db.msg.audit('create', summarygenerator)
18
19 # vim: set filetype=python ts=4 sw=4 et si