Tobias Herp <tobias.herp <at> gmx.de> writes:
>
> David Linke wrote:
> > Tobias Herp <tobias.herp <at> gmx.de>
writes:
> >
> >> Hi,
> >>
> >> I have a userlist class, multilinking users,
and the following
> >> three entries:
> >>
> > (...)
> >> # DOESN'T WORK YET:
> >> if 0 and txtlist:
> >> txt = 'nn'.join(txtlist)
> >> from roundup.mailgw import Message
> >> if not newvalues.has_key('messages'):
> >> newvalues['messages'] = []
> >> # the Message constructor apparently
expects
> >> # a complete mail message, so this
won't work:
> >>
newvalues['messages'].append(Message(txt))
> >
> > Shouldn't you use newvalues['content'] instead of
newvalues
> > ['messages']?
>
> I don't know; should I? This didn't occur to me because
I don't
> understand completely for now how the content is turned
into a
> message...
No. That was nonsense. Try this:
content = 'Hi from the auditor!'
if newvalues.has_key('messages'):
messageid = newvalues['messages'][-1] # add to last
message
content = 'n'.join([db.msg.get(messageid, 'content'),
content])
db.msg.set(messageid, content=content)
else:
messageid = db.msg.create(author=db.getuid(),
date=date.Date('.'),
content=content)
newvalues['messages'] = [messageid]
David
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Roundup-users mailing list
Roundup-users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/roundup-u
sers
|