aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Message.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java
index f6c578e6c..be30ced7a 100644
--- a/src/main/java/de/pixart/messenger/entities/Message.java
+++ b/src/main/java/de/pixart/messenger/entities/Message.java
@@ -676,16 +676,14 @@ public class Message extends AbstractEntity {
}
if (!url.getProtocol().equalsIgnoreCase("http") && !url.getProtocol().equalsIgnoreCase("https")) {
return Decision.NEVER;
- } else if (oob) {
+ } else if (oob || encrypted) {
return Decision.MUST;
}
- String extension = extractRelevantExtension(url);
- if (extension == null) {
+ final String extension = extractRelevantExtension(url);
+ if (extension == null
+ || encryption == Message.ENCRYPTION_OTR
+ || encryption == Message.ENCRYPTION_AXOLOTL) {
return Decision.NEVER;
- }
-
- if (encrypted) {
- return Decision.MUST;
} else if (Transferable.VALID_IMAGE_EXTENSIONS.contains(extension)
|| Transferable.WELL_KNOWN_EXTENSIONS.contains(extension)) {
return Decision.SHOULD;