Reply to recipient, not to known self

pull/91/head
M66B 6 years ago
parent 131beadea9
commit 9409db25d6

@ -746,22 +746,21 @@ public class FragmentCompose extends FragmentEx {
} else { } else {
account = ref.account; 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 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()); String replyto = (ref.reply == null || ref.reply.length == 0 ? null : ((InternetAddress) ref.reply[0]).getAddress());
List<EntityIdentity> identities = db.identity().getIdentities(); List<EntityIdentity> identities = db.identity().getIdentities();
for (EntityIdentity identity : identities) for (EntityIdentity identity : identities)
if (from != null && from.equals(identity.email)) { if (replyto == null) {
Address[] tmp = ref.to; if (from != null && from.equals(identity.email)) {
ref.to = ref.from; Address[] tmp = ref.to;
ref.reply = null; ref.to = ref.from;
ref.from = tmp; ref.reply = null;
break; ref.from = tmp;
} else if (replyto != null && replyto.equals(identity.email)) { break;
Address[] tmp = ref.reply; }
ref.to = ref.from; } else if (replyto.equals(identity.email)) {
ref.reply = null; ref.reply = ref.to;
ref.from = tmp;
break; break;
} }
} }

Loading…
Cancel
Save