1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

Added dev.domain property

This commit is contained in:
M66B 2022-04-02 12:29:19 +02:00
parent e78aaa9e7c
commit 08ef349aae
2 changed files with 8 additions and 4 deletions

View file

@ -161,8 +161,9 @@ android {
buildConfigField "String", "LIBRAVATAR_DNS", "\"_avatars-sec._tcp,_avatars._tcp\""
buildConfigField "String", "LIBRAVATAR_URI", "\"https://seccdn.libravatar.org/avatar/\""
buildConfigField "String", "LIBRAVATAR_INFO", "\"https://libravatar.org/\""
buildConfigField "String", "GPA_URI", localProperties.getProperty("gpa.uri", "\"\"")
buildConfigField "String", "PAYPAL_URI", localProperties.getProperty("paypal.uri", "\"\"")
buildConfigField "String", "GPA_URI", localProperties.getProperty("gpa.uri", "\"\"")
buildConfigField "String", "DEV_DOMAIN", localProperties.getProperty("dev.domain", "\"\"")
}
fdroid {
dimension "all"
@ -180,6 +181,7 @@ android {
buildConfigField "String", "LIBRAVATAR_INFO", "\"https://libravatar.org/\""
buildConfigField "String", "PAYPAL_URI", "\"\""
buildConfigField "String", "GPA_URI", "\"\""
buildConfigField "String", "DEV_DOMAIN", "\"\""
}
play {
dimension "all"
@ -198,6 +200,7 @@ android {
buildConfigField "String", "LIBRAVATAR_INFO", "\"\""
buildConfigField "String", "PAYPAL_URI", "\"\""
buildConfigField "String", "GPA_URI", "\"\""
buildConfigField "String", "DEV_DOMAIN", "\"\""
}
amazon {
dimension "all"
@ -216,6 +219,7 @@ android {
buildConfigField "String", "LIBRAVATAR_INFO", "\"\""
buildConfigField "String", "PAYPAL_URI", "\"\""
buildConfigField "String", "GPA_URI", "\"\""
buildConfigField "String", "DEV_DOMAIN", "\"\""
}
}

View file

@ -1524,18 +1524,18 @@ public class MessageHelper {
}
}
if (thread == null && BuildConfig.DEBUG) {
if (thread == null && !TextUtils.isEmpty(BuildConfig.DEV_DOMAIN)) {
String awsses = imessage.getHeader("X-SES-Outgoing", null);
if (!TextUtils.isEmpty(awsses)) {
Address[] froms = getFrom();
if (froms != null && froms.length > 0) {
String from = ((InternetAddress) froms[0]).getAddress();
if (!TextUtils.isEmpty(from) && from.endsWith("@faircode.eu")) {
if (!TextUtils.isEmpty(from) && from.endsWith("@" + BuildConfig.DEV_DOMAIN)) {
Address[] rr = getReply();
Address[] tos = (rr != null && rr.length > 0 ? rr : getTo());
if (tos != null && tos.length > 0) {
String email = ((InternetAddress) tos[0]).getAddress();
if (!TextUtils.isEmpty(email) && !email.endsWith("@faircode.eu"))
if (!TextUtils.isEmpty(email) && !email.endsWith("@" + BuildConfig.DEV_DOMAIN))
thread = "ses:" + email;
}
}