fix getting accused status for messages
This commit is contained in:
parent
41827c4160
commit
776f5d3ac8
1 changed files with 41 additions and 44 deletions
|
|
@ -135,7 +135,7 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh
|
||||||
profiles[mail.profile_link] = self.browser.get_profile(mail.profile_link)
|
profiles[mail.profile_link] = self.browser.get_profile(mail.profile_link)
|
||||||
mail.signature += u'\n%s' % profiles[mail.profile_link].get_profile_text()
|
mail.signature += u'\n%s' % profiles[mail.profile_link].get_profile_text()
|
||||||
|
|
||||||
if mail.sender != my_name:
|
if mail.sender == my_name:
|
||||||
if mail.new:
|
if mail.new:
|
||||||
flags |= Message.IS_NOT_ACCUSED
|
flags |= Message.IS_NOT_ACCUSED
|
||||||
else:
|
else:
|
||||||
|
|
@ -235,7 +235,6 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh
|
||||||
self.browser.post_mail(message.thread.id, message.content)
|
self.browser.post_mail(message.thread.id, message.content)
|
||||||
|
|
||||||
def get_contact(self, contact):
|
def get_contact(self, contact):
|
||||||
try:
|
|
||||||
with self.browser:
|
with self.browser:
|
||||||
if isinstance(contact, Contact):
|
if isinstance(contact, Contact):
|
||||||
_id = contact.id
|
_id = contact.id
|
||||||
|
|
@ -276,8 +275,6 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh
|
||||||
contact.profile.append(s)
|
contact.profile.append(s)
|
||||||
|
|
||||||
return contact
|
return contact
|
||||||
except BrowserUnavailable:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def init_optimizations(self):
|
def init_optimizations(self):
|
||||||
self.OPTIM_PROFILE_WALKER = ProfilesWalker(self.weboob.scheduler, self.storage, self.browser)
|
self.OPTIM_PROFILE_WALKER = ProfilesWalker(self.weboob.scheduler, self.storage, self.browser)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue