aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/entities/Message.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/entities/Message.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/entities/Message.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/Message.java b/src/main/java/de/thedevstack/conversationsplus/entities/Message.java
index 6a6a5e50..b0a5bb3b 100644
--- a/src/main/java/de/thedevstack/conversationsplus/entities/Message.java
+++ b/src/main/java/de/thedevstack/conversationsplus/entities/Message.java
@@ -83,6 +83,8 @@ public class Message extends AbstractEntity {
private String axolotlFingerprint = null;
private Decision mTreatAsDownloadAble = Decision.NOT_DECIDED;
+ private boolean httpUploaded;
+
private Message() {
}
@@ -535,6 +537,10 @@ public class Message extends AbstractEntity {
mTreatAsDownloadAble = Decision.NEVER;
}
+ public void setTreatAsDownloadable(Decision downloadable) {
+ this.mTreatAsDownloadAble = downloadable;
+ }
+
public Decision treatAsDownloadable() {
// only test this ones, body will not change
if (mTreatAsDownloadAble != Decision.NOT_DECIDED) {
@@ -554,9 +560,6 @@ public class Message extends AbstractEntity {
if (!url.getProtocol().equalsIgnoreCase("http") && !url.getProtocol().equalsIgnoreCase("https")) {
mTreatAsDownloadAble = Decision.NEVER;
return mTreatAsDownloadAble;
- } else if (oob) {
- mTreatAsDownloadAble = Decision.MUST;
- return mTreatAsDownloadAble;
}
String extension = extractRelevantExtension(url);
if (extension == null) {
@@ -754,6 +757,14 @@ public class Message extends AbstractEntity {
return inUnencryptedSession || getCleanedEncryption(this.getEncryption()) == pastEncryption;
}
+ public boolean isHttpUploaded() {
+ return httpUploaded;
+ }
+
+ public void setHttpUploaded(boolean httpUploaded) {
+ this.httpUploaded = httpUploaded;
+ }
+
private static int getCleanedEncryption(int encryption) {
if (encryption == ENCRYPTION_DECRYPTED || encryption == ENCRYPTION_DECRYPTION_FAILED) {
return ENCRYPTION_PGP;