mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 17:27:00 +00:00
Reply to recipient, not to known self
This commit is contained in:
parent
131beadea9
commit
9409db25d6
1 changed files with 11 additions and 12 deletions
|
@ -746,22 +746,21 @@ public class FragmentCompose extends FragmentEx {
|
|||
} else {
|
||||
account = ref.account;
|
||||
|
||||
// Reply to sender, not to known self
|
||||
// Reply to recipient, not to known self
|
||||
String from = (ref.from == null || ref.from.length == 0 ? null : ((InternetAddress) ref.from[0]).getAddress());
|
||||
String replyto = (ref.reply == null || ref.reply.length == 0 ? null : ((InternetAddress) ref.reply[0]).getAddress());
|
||||
List<EntityIdentity> identities = db.identity().getIdentities();
|
||||
for (EntityIdentity identity : identities)
|
||||
if (replyto == null) {
|
||||
if (from != null && from.equals(identity.email)) {
|
||||
Address[] tmp = ref.to;
|
||||
ref.to = ref.from;
|
||||
ref.reply = null;
|
||||
ref.from = tmp;
|
||||
break;
|
||||
} else if (replyto != null && replyto.equals(identity.email)) {
|
||||
Address[] tmp = ref.reply;
|
||||
ref.to = ref.from;
|
||||
ref.reply = null;
|
||||
ref.from = tmp;
|
||||
}
|
||||
} else if (replyto.equals(identity.email)) {
|
||||
ref.reply = ref.to;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue