Compare reply parent domain

This commit is contained in:
M66B 2020-01-21 10:07:26 +01:00
parent 7c9ee670df
commit 08b1d59acb
1 changed files with 2 additions and 2 deletions

View File

@ -2174,12 +2174,12 @@ class Core {
String r = ((InternetAddress) reply).getAddress(); String r = ((InternetAddress) reply).getAddress();
int rat = (r == null ? -1 : r.indexOf('@')); int rat = (r == null ? -1 : r.indexOf('@'));
if (rat > 0) { if (rat > 0) {
String rdomain = r.substring(rat + 1); String rdomain = ConnectionHelper.getParentDomain(r.substring(rat + 1));
for (Address from : message.from) { for (Address from : message.from) {
String f = ((InternetAddress) from).getAddress(); String f = ((InternetAddress) from).getAddress();
int fat = (f == null ? -1 : f.indexOf('@')); int fat = (f == null ? -1 : f.indexOf('@'));
if (fat > 0) { if (fat > 0) {
String fdomain = f.substring(fat + 1); String fdomain = ConnectionHelper.getParentDomain(f.substring(fat + 1));
if (!rdomain.equalsIgnoreCase(fdomain)) { if (!rdomain.equalsIgnoreCase(fdomain)) {
if (message.warning == null) if (message.warning == null)
message.warning = context.getString(R.string.title_reply_domain, fdomain, rdomain); message.warning = context.getString(R.string.title_reply_domain, fdomain, rdomain);