Fixed can bounce check

This commit is contained in:
M66B 2021-02-24 15:14:02 +01:00
parent 107d648641
commit 60b33adb22
1 changed files with 2 additions and 9 deletions

View File

@ -2420,15 +2420,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
boolean canBounce = false; boolean canBounce = false;
if (message.return_path != null && message.return_path.length == 1) { if (message.return_path != null && message.return_path.length == 1) {
canBounce = true; canBounce = true;
List<Address> addresses = new ArrayList<>(); for (EntityIdentity identity : data.identities)
if (message.to != null) if (identity.similarAddress(message.return_path[0])) {
addresses.addAll(Arrays.asList(message.to));
if (message.cc != null)
addresses.addAll(Arrays.asList(message.cc));
if (message.bcc != null)
addresses.addAll(Arrays.asList(message.bcc));
for (Address address : addresses)
if (MessageHelper.equalEmail(address, message.return_path[0])) {
canBounce = false; canBounce = false;
break; break;
} }