diff options
Diffstat (limited to 'src/eu/siacs/conversations/persistance')
-rw-r--r-- | src/eu/siacs/conversations/persistance/FileBackend.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/persistance/FileBackend.java b/src/eu/siacs/conversations/persistance/FileBackend.java index c451b906..868e2398 100644 --- a/src/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/eu/siacs/conversations/persistance/FileBackend.java @@ -47,13 +47,22 @@ public class FileBackend { public LruCache<String, Bitmap> getThumbnailCache() { return thumbnailCache; } - + public JingleFile getJingleFile(Message message) { + return getJingleFile(message, true); + } + + public JingleFile getJingleFile(Message message, boolean decrypted) { Conversation conversation = message.getConversation(); String prefix = context.getFilesDir().getAbsolutePath(); String path = prefix + "/" + conversation.getAccount().getJid() + "/" + conversation.getContactJid(); - String filename = message.getUuid() + ".webp"; + String filename; + if ((decrypted)||(message.getEncryption() == Message.ENCRYPTION_NONE)) { + filename = message.getUuid() + ".webp"; + } else { + filename = message.getUuid() + ".webp.pgp"; + } return new JingleFile(path + "/" + filename); } |