Check cc/bcc for username

pull/210/head
M66B 2 years ago
parent a7eeb1840a
commit a4696bdf28

@ -5086,7 +5086,6 @@ public class FragmentCompose extends FragmentBase {
data.draft.to = (ref.reply == null || ref.reply.length == 0 ? ref.from : ref.reply);
}
if (data.draft.from != null && data.draft.from.length > 0) {
Address preferred = null;
if (ref.identity != null) {
EntityIdentity recognized = db.identity().getIdentity(ref.identity);
@ -5096,7 +5095,15 @@ public class FragmentCompose extends FragmentBase {
Address same = null;
Address similar = null;
for (Address from : data.draft.from) {
List<Address> addresses = new ArrayList<>();
if (data.draft.from != null)
addresses.addAll(Arrays.asList(data.draft.from));
if (ref.cc != null)
addresses.addAll(Arrays.asList(ref.cc));
if (ref.bcc != null)
addresses.addAll(Arrays.asList(ref.bcc));
for (Address from : addresses) {
if (same == null && recognized.sameAddress(from))
same = from;
if (similar == null && recognized.similarAddress(from))
@ -5131,7 +5138,6 @@ public class FragmentCompose extends FragmentBase {
} else
EntityLog.log(context, "Preferred=null");
}
}
if ("reply_all".equals(action))
data.draft.cc = ref.getAllRecipients(data.identities, ref.account);

Loading…
Cancel
Save