Ticket #192: strip-on-update-only.patch
File strip-on-update-only.patch, 1.6 KB (added by Konstantin Ryabitsev <icon@…>, 14 years ago) |
---|
-
email2trac.py.in
old new 786 786 if update_fields: 787 787 self.update_ticket_fields(tkt, update_fields) 788 788 789 message_parts = self.get_message_parts(m )789 message_parts = self.get_message_parts(m, is_update=1) 790 790 message_parts = self.unique_attachment_names(message_parts) 791 791 792 792 # Must we update some ticket fields properties via body_text … … 1338 1338 1339 1339 return part.get_param('inline', None, 'Content-Disposition') == '' or not part.has_key('Content-Disposition') 1340 1340 1341 def get_message_parts(self, msg ):1341 def get_message_parts(self, msg, is_update=0): 1342 1342 """ 1343 1343 parses the email message and returns a list of body parts and attachments 1344 1344 body parts are returned as strings, attachments are returned as tuples of (filename, Message object) … … 1408 1408 1409 1409 if self.REFLOW and not self.VERBATIM_FORMAT and format == 'flowed': 1410 1410 body_text = self.reflow(body_text, delsp == 'yes') 1411 1412 if self.STRIP_SIGNATURE:1413 body_text = self.strip_signature(body_text)1414 1411 1415 if self.STRIP_QUOTES: 1416 body_text = self.strip_quotes(body_text) 1412 if is_update: 1413 if self.STRIP_SIGNATURE: 1414 body_text = self.strip_signature(body_text) 1415 if self.DEBUG: 1416 print 'TD: Update, stripped signature' 1417 1418 if self.STRIP_QUOTES: 1419 body_text = self.strip_quotes(body_text) 1420 if self.DEBUG: 1421 print 'TD: Update, stripped quotes' 1417 1422 1418 1423 if self.INLINE_PROPERTIES: 1419 1424 body_text = self.inline_properties(body_text)