1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 21:55:13 +00:00

Generalize do-no-reply

This commit is contained in:
M66B 2021-11-04 07:13:12 +01:00
parent 0e5242c319
commit dc163ff447

View file

@ -326,6 +326,10 @@ public class FragmentCompose extends FragmentBase {
private static ExecutorService executor = Helper.getBackgroundExecutor(1, "encrypt");
private static final List<String> DO_NOT_REPLY = Collections.unmodifiableList(Arrays.asList(
"noreply", "no-reply", "do-not-reply"
));
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -5796,11 +5800,11 @@ public class FragmentCompose extends FragmentBase {
String username = UriHelper.getEmailUser(email);
if (!TextUtils.isEmpty(username)) {
username = username.toLowerCase(Locale.ROOT);
if (username.contains("noreply") ||
username.contains("no-reply")) {
noreply = true;
break;
}
for (String value : DO_NOT_REPLY)
if (username.contains(value)) {
noreply = true;
break;
}
}
}
args.putBoolean("remind_noreply", noreply);