aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/persistance
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-06-30 17:15:02 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-06-30 17:15:02 +0200
commitaca9d8036c53c0d0689ed94d67d7c5071d74b14e (patch)
treea83e95883ed69fc34fb745345c88ee249b1ed906 /src/main/java/eu/siacs/conversations/persistance
parent6af97c724cdcc7d94070a99e9035d84373c5eb75 (diff)
made httpconnection (download) ready all kind of files
Diffstat (limited to 'src/main/java/eu/siacs/conversations/persistance')
-rw-r--r--src/main/java/eu/siacs/conversations/persistance/FileBackend.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
index c20cfa0e3..52373fefb 100644
--- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
+++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
@@ -499,7 +499,11 @@ public class FileBackend {
message.setBody(url.toString()+"|"+Long.toString(file.getSize()) + '|' + imageWidth + '|' + imageHeight);
}
} else {
- message.setBody(url.toString()+"|"+Long.toString(file.getSize()));
+ if (url != null) {
+ message.setBody(url.toString()+"|"+Long.toString(file.getSize()));
+ } else {
+ message.setBody(Long.toString(file.getSize()));
+ }
}
}