mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 16:43:26 +02:00
Raw message file for S/MIME decrypted messages
This commit is contained in:
@@ -185,6 +185,7 @@ import org.openintents.openpgp.OpenPgpSignatureResult;
|
||||
import org.openintents.openpgp.util.OpenPgpApi;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -10806,6 +10807,14 @@ public class FragmentMessages extends FragmentBase
|
||||
db.message().setMessageStored(message.id, new Date().getTime());
|
||||
db.message().setMessageFts(message.id, false);
|
||||
|
||||
if (BuildConfig.DEBUG || debug) {
|
||||
File raw = message.getRawFile(context);
|
||||
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(raw))) {
|
||||
imessage.writeTo(os);
|
||||
}
|
||||
db.message().setMessageRaw(message.id, true);
|
||||
}
|
||||
|
||||
if (alias != null && !duplicate && message.identity != null) {
|
||||
EntityIdentity identity = db.identity().getIdentity(message.identity);
|
||||
if (identity != null) {
|
||||
|
||||
Reference in New Issue
Block a user