Skip to content

Commit ad8887e

Browse files
author
Richard Jones
committed
oops, missing from yesterday's checkin
1 parent 771ab17 commit ad8887e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#$Id: messagesummary.py,v 1.1 2003-02-13 21:14:27 richard 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'], 1, 1)
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

0 commit comments

Comments
 (0)