diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 1 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Message.java | 17 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index 5046797f..7878cecd 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -141,6 +141,7 @@ public class Conversation extends AbstractEntity implements Blockable { } public Message findMessageWithFileAndUuid(final String uuid) { + // TODO Implement this method to find a message by a real filename - not uuid synchronized (this.messages) { for (final Message message : this.messages) { if ((message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE) 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; |