aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Downloadable.java2
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Downloadable.java b/src/main/java/eu/siacs/conversations/entities/Downloadable.java
index c32165e8..8fae91bb 100644
--- a/src/main/java/eu/siacs/conversations/entities/Downloadable.java
+++ b/src/main/java/eu/siacs/conversations/entities/Downloadable.java
@@ -4,6 +4,7 @@ public interface Downloadable {
String[] VALID_IMAGE_EXTENSIONS = {"webp", "jpeg", "jpg", "png", "jpe"};
String[] VALID_CRYPTO_EXTENSIONS = {"pgp", "gpg", "otr"};
+ String[] WELL_KNOWN_EXTENSIONS = {"pdf","m4a"};
int STATUS_UNKNOWN = 0x200;
int STATUS_CHECKING = 0x201;
@@ -14,6 +15,7 @@ public interface Downloadable {
int STATUS_OFFER_CHECK_FILESIZE = 0x206;
int STATUS_UPLOADING = 0x207;
+
boolean start();
int getStatus();
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index d15f3bbd..ac5a9d56 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -497,7 +497,8 @@ public class Message extends AbstractEntity {
} else {
return Decision.NEVER;
}
- } else if (Arrays.asList(Downloadable.VALID_IMAGE_EXTENSIONS).contains(extension)) {
+ } else if (Arrays.asList(Downloadable.VALID_IMAGE_EXTENSIONS).contains(extension)
+ || Arrays.asList(Downloadable.WELL_KNOWN_EXTENSIONS).contains(extension)) {
return Decision.SHOULD;
} else {
return Decision.NEVER;