aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities/Message.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Message.java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index a63d033d..d80400d8 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -586,6 +586,14 @@ public class Message extends AbstractEntity {
return type == TYPE_FILE || type == TYPE_IMAGE;
}
+ public boolean hasFileOnRemoteHost() {
+ return isFileOrImage() && getImageParams().url != null;
+ }
+
+ public boolean needsUploading() {
+ return isFileOrImage() && getImageParams().url == null;
+ }
+
public class ImageParams {
public URL url;
public long size = 0;