From 5a96b425dad38e7ecaf8b8cf09bf6ef6c7567887 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Mon, 24 Oct 2011 12:43:49 +0200 Subject: [PATCH] add 'Sent with my iPhone' in mail signatures when needed --- weboob/backends/aum/backend.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/weboob/backends/aum/backend.py b/weboob/backends/aum/backend.py index 5234c847..ee118a45 100644 --- a/weboob/backends/aum/backend.py +++ b/weboob/backends/aum/backend.py @@ -205,6 +205,11 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh else: flags |= Message.IS_ACCUSED + signature = u'' + if mail['src']: + signature += u'Sent from my %s\n\n' % mail['src'] + if mail['id_from'] in contacts: + signature += contacts[mail['id_from']].get_text() msg = Message(thread=thread, id=int(time.strftime('%Y%m%d%H%M%S', parse_dt(mail['date']).timetuple())), @@ -213,7 +218,7 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh receivers=[my_name if int(mail['id_from']) != self.browser.my_id else mails['member']['pseudo']], date=parse_dt(mail['date']), content=unescape(mail['message']).strip(), - signature=contacts[mail['id_from']].get_text() if mail['id_from'] in contacts else None, + signature=signature, children=[], flags=flags) if child: