mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Validate "original message" field of identity header when loading drafts
This commit is contained in:
parent
a1caebdcf1
commit
4e21f049d3
@ -2384,7 +2384,15 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
if (k9identity.containsKey(IdentityField.ORIGINAL_MESSAGE)) {
|
||||
mMessageReference = null;
|
||||
try {
|
||||
mMessageReference = new MessageReference(k9identity.get(IdentityField.ORIGINAL_MESSAGE));
|
||||
String originalMessage = k9identity.get(IdentityField.ORIGINAL_MESSAGE);
|
||||
MessageReference messageReference = new MessageReference(originalMessage);
|
||||
|
||||
// Check if this is a valid account in our database
|
||||
Preferences prefs = Preferences.getPreferences(getApplicationContext());
|
||||
Account account = prefs.getAccount(messageReference.accountUuid);
|
||||
if (account != null) {
|
||||
mMessageReference = messageReference;
|
||||
}
|
||||
} catch (MessagingException e) {
|
||||
Log.e(K9.LOG_TAG, "Could not decode message reference in identity.", e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user