aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-01-05 21:05:24 +0100
committersteckbrief <steckbrief@chefmail.de>2017-01-05 21:05:24 +0100
commitc09e7f0a21f563359c69f0e4198c7563cd2d4809 (patch)
treea52009fa04da58a10bad7de19814e15e010fde7a /src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
parent867ee316619f814e6311668d0f2b910cecdd6393 (diff)
parent2586fe2b9d745c0666656acb6beb4020805dd220 (diff)
Merge branch 'trz/rebase' into trz/rename
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java b/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
index a35ed043..6643c276 100644
--- a/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
+++ b/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
@@ -107,7 +107,18 @@ public class FileBackend {
}
public static DownloadableFile getFile(Message message, boolean decrypted) {
- return new DownloadableFile(getFilePath(message, decrypted));
+ DownloadableFile downloadableFile = new DownloadableFile(getFilePath(message, decrypted));
+ FileParams fileParams = message.getFileParams();
+ if (null != fileParams) {
+ if (null != fileParams.getKey()) {
+ downloadableFile.setKey(fileParams.getKey());
+ }
+ if (null != fileParams.getIv()) {
+ downloadableFile.setIv(fileParams.getIv());
+ }
+ }
+
+ return downloadableFile;
}
protected static String getFilePath(Message message, String extension) {