diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-05-13 11:23:45 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-05-13 11:23:45 +0200 |
commit | 351db27a77c200e526b86c318213b72cd65d1b7b (patch) | |
tree | 7802de24b0666d1a28ecffec0280d74173642d2b /src/main/java/de/thedevstack/conversationsplus/entities/Message.java | |
parent | 70938a31a0e78203449d769fa5bda15ce73d1ed4 (diff) | |
parent | 10e607ac51dcc42fa1b54bacb698beed43750de7 (diff) |
Merge branch 'master' into message_display_rework
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/entities/Message.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/entities/Message.java | 17 |
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; |