Use original email address for PGP

pull/200/head
M66B 3 years ago
parent d2cabdd668
commit 9aa2942f8a

@ -2276,7 +2276,7 @@ public class FragmentCompose extends FragmentBase {
List<String> emails = new ArrayList<>(); List<String> emails = new ArrayList<>();
for (int i = 0; i < recipients.size(); i++) { for (int i = 0; i < recipients.size(); i++) {
InternetAddress recipient = (InternetAddress) recipients.get(i); InternetAddress recipient = (InternetAddress) recipients.get(i);
String email = recipient.getAddress().toLowerCase(Locale.ROOT); String email = recipient.getAddress();
if (!emails.contains(email)) if (!emails.contains(email))
emails.add(email); emails.add(email);
} }
@ -2902,7 +2902,7 @@ public class FragmentCompose extends FragmentBase {
Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY); Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY);
intent.putExtra(OpenPgpApi.EXTRA_KEY_ID, pgpSignKeyId); intent.putExtra(OpenPgpApi.EXTRA_KEY_ID, pgpSignKeyId);
intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE, true); intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE, true);
intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE_USER_ID, identity.email.toLowerCase(Locale.ROOT)); intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE_USER_ID, identity.email);
intent.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); intent.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true);
intent.putExtra(BuildConfig.APPLICATION_ID, largs); intent.putExtra(BuildConfig.APPLICATION_ID, largs);
return intent; return intent;
@ -2922,7 +2922,7 @@ public class FragmentCompose extends FragmentBase {
Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY); Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY);
intent.putExtra(OpenPgpApi.EXTRA_KEY_ID, pgpSignKeyId); intent.putExtra(OpenPgpApi.EXTRA_KEY_ID, pgpSignKeyId);
intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE, true); intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE, true);
intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE_USER_ID, identity.email.toLowerCase(Locale.ROOT)); intent.putExtra(OpenPgpApi.EXTRA_MINIMIZE_USER_ID, identity.email);
intent.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true); intent.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true);
intent.putExtra(BuildConfig.APPLICATION_ID, largs); intent.putExtra(BuildConfig.APPLICATION_ID, largs);
return intent; return intent;
@ -5299,7 +5299,7 @@ public class FragmentCompose extends FragmentBase {
String[] userIds = new String[recipients.size()]; String[] userIds = new String[recipients.size()];
for (int i = 0; i < recipients.size(); i++) { for (int i = 0; i < recipients.size(); i++) {
InternetAddress recipient = (InternetAddress) recipients.get(i); InternetAddress recipient = (InternetAddress) recipients.get(i);
userIds[i] = recipient.getAddress().toLowerCase(Locale.ROOT); userIds[i] = recipient.getAddress();
} }
Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY_IDS); Intent intent = new Intent(OpenPgpApi.ACTION_GET_KEY_IDS);

@ -6668,7 +6668,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
continue; continue;
switch (key) { switch (key) {
case "addr": case "addr":
addr = value.toLowerCase(Locale.ROOT); addr = value;
break; break;
case "prefer-encrypt": case "prefer-encrypt":
mutual = value.trim().toLowerCase(Locale.ROOT).equals("mutual"); mutual = value.trim().toLowerCase(Locale.ROOT).equals("mutual");

Loading…
Cancel
Save