aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities/Message.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-04-23 23:22:57 +0200
committersteckbrief <steckbrief@chefmail.de>2016-04-23 23:22:57 +0200
commitb5abdd1b6ddf73cc9da49e3213d0d44e4b29ff5c (patch)
treeb1d28cc2b00622d7feeff4569aa2a054d3a82b80 /src/main/java/eu/siacs/conversations/entities/Message.java
parent52fec558adb2b4d9bb3df314fd919570e7198e26 (diff)
parentb789ace386ef3cfe6e0c3834b2a425813f702f43 (diff)
Merge remote-tracking branch 'remotes/origin/trz/rename' into trz/rebase
Conflicts: src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java src/main/java/de/thedevstack/conversationsplus/utils/MessageUtil.java src/main/java/eu/siacs/conversations/generator/MessageGenerator.java src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Message.java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index 7a5be8f8..6faebc65 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/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;