summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorJefferson Stachelski <jstachel@thoughtworks.com>2015-11-18 19:36:33 -0200
committerJefferson Stachelski <jstachel@thoughtworks.com>2015-11-18 19:39:26 -0200
commit2615c785260ea168f0eb8d9fe2a8a6576a5392dd (patch)
tree85f2513843f2e6cf1f70d70eb8351953ae1c3973 /service/pixelated
parentba3fe6aca3588262e76d467ae004d0818c987358 (diff)
Issue #494 - Fixed reply when the replayer is the sender
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/mailstore/leap_mailstore.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/service/pixelated/adapter/mailstore/leap_mailstore.py b/service/pixelated/adapter/mailstore/leap_mailstore.py
index e7b183db..21c85b74 100644
--- a/service/pixelated/adapter/mailstore/leap_mailstore.py
+++ b/service/pixelated/adapter/mailstore/leap_mailstore.py
@@ -152,21 +152,11 @@ class LeapMail(Mail):
recipients = self.remove_duplicates(recipients)
ccs = self._decoded_header_utf_8(self._reply_recipient('Cc'))
- result['single'] = self._single_reply_recipient(recipients, sender_mail)
+ result['single'] = sender_mail
result['all']['to-field'] = recipients
result['all']['cc-field'] = ccs
return result
- def _single_reply_recipient(self, recipients, sender_mail):
- """
- Currently the domain model expects only one single recipient for reply action. But it should support an array,
- or even better: there should not be any conceptual difference between reply and reply all for this logic
- """
- if self._parsed_mail_matches(sender_mail, InputMail.FROM_EMAIL_ADDRESS):
- return recipients[0]
- else:
- return sender_mail
-
def remove_duplicates(self, recipients):
return list(set(recipients))
@@ -175,7 +165,7 @@ class LeapMail(Mail):
if not recipients:
recipients = []
- return [recipient for recipient in recipients if not self._parsed_mail_matches(recipient, InputMail.FROM_EMAIL_ADDRESS)]
+ return recipients
def _parsed_mail_matches(self, to_parse, expected):
if InputMail.FROM_EMAIL_ADDRESS is None: