Use avatar of original sender when forwarded

This commit is contained in:
M66B
2023-09-15 15:13:21 +02:00
parent 9061f345a6
commit 7e67215356
2 changed files with 14 additions and 1 deletions

View File

@@ -409,6 +409,19 @@ public class EntityMessage implements Serializable {
return notJunk;
}
boolean isForwarder() {
if (from == null || from.length != 1)
return false;
if (submitter == null || submitter.length != 1)
return false;
String email = ((InternetAddress) from[0]).getAddress();
String domain = UriHelper.getEmailDomain(email);
return "duck.com".equals(domain) ||
"simplelogin.co".equals(domain) ||
"mozmail.com".equals(domain) ||
"anonaddy.me".equals(domain);
}
String[] checkFromDomain(Context context) {
return MessageHelper.equalRootDomain(context, from, smtp_from);
}