Mercurial > p > roundup > code
comparison roundup/mailgw.py @ 321:d0d6feb17d2f
Fix unread->chatting auto transition, thanks Roch'e
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 23 Oct 2001 22:57:52 +0000 |
| parents | 895a1c09f4ae |
| children | 256776bfdfc5 |
comparison
equal
deleted
inserted
replaced
| 320:61c42790c3f1 | 321:d0d6feb17d2f |
|---|---|
| 70 set() method to add the message to the item's spool; in the second case we | 70 set() method to add the message to the item's spool; in the second case we |
| 71 are calling the create() method to create a new node). If an auditor raises | 71 are calling the create() method to create a new node). If an auditor raises |
| 72 an exception, the original message is bounced back to the sender with the | 72 an exception, the original message is bounced back to the sender with the |
| 73 explanatory message given in the exception. | 73 explanatory message given in the exception. |
| 74 | 74 |
| 75 $Id: mailgw.py,v 1.23 2001-10-21 04:00:20 richard Exp $ | 75 $Id: mailgw.py,v 1.24 2001-10-23 22:57:52 richard Exp $ |
| 76 ''' | 76 ''' |
| 77 | 77 |
| 78 | 78 |
| 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri | 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri |
| 80 import traceback | 80 import traceback |
| 372 unread_id = self.db.status.lookup('unread') | 372 unread_id = self.db.status.lookup('unread') |
| 373 chatting_id = self.db.status.lookup('chatting') | 373 chatting_id = self.db.status.lookup('chatting') |
| 374 except KeyError: | 374 except KeyError: |
| 375 pass | 375 pass |
| 376 else: | 376 else: |
| 377 if not props['status'] or props['status'] == unread_id: | 377 if (not props.has_key('status') or |
| 378 props['status'] == unread_id): | |
| 378 props['status'] = chatting_id | 379 props['status'] = chatting_id |
| 379 | 380 |
| 380 cl.set(nodeid, **props) | 381 cl.set(nodeid, **props) |
| 381 else: | 382 else: |
| 382 # If just an item class name is found there, we attempt to create a | 383 # If just an item class name is found there, we attempt to create a |
| 429 l.append(section) | 430 l.append(section) |
| 430 return summary, '\n\n'.join(l) | 431 return summary, '\n\n'.join(l) |
| 431 | 432 |
| 432 # | 433 # |
| 433 # $Log: not supported by cvs2svn $ | 434 # $Log: not supported by cvs2svn $ |
| 435 # Revision 1.23 2001/10/21 04:00:20 richard | |
| 436 # MailGW now moves 'unread' to 'chatting' on receiving e-mail for an issue. | |
| 437 # | |
| 434 # Revision 1.22 2001/10/21 03:35:13 richard | 438 # Revision 1.22 2001/10/21 03:35:13 richard |
| 435 # bug #473125: Paragraph in e-mails | 439 # bug #473125: Paragraph in e-mails |
| 436 # | 440 # |
| 437 # Revision 1.21 2001/10/21 00:53:42 richard | 441 # Revision 1.21 2001/10/21 00:53:42 richard |
| 438 # bug #473130: Nosy list not set correctly | 442 # bug #473130: Nosy list not set correctly |
