mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
also offer http download for some 'well known extensions'
This commit is contained in:
parent
f5ba9d4223
commit
e4d1bd415d
@ -4,6 +4,7 @@ public interface Downloadable {
|
|||||||
|
|
||||||
String[] VALID_IMAGE_EXTENSIONS = {"webp", "jpeg", "jpg", "png", "jpe"};
|
String[] VALID_IMAGE_EXTENSIONS = {"webp", "jpeg", "jpg", "png", "jpe"};
|
||||||
String[] VALID_CRYPTO_EXTENSIONS = {"pgp", "gpg", "otr"};
|
String[] VALID_CRYPTO_EXTENSIONS = {"pgp", "gpg", "otr"};
|
||||||
|
String[] WELL_KNOWN_EXTENSIONS = {"pdf","m4a"};
|
||||||
|
|
||||||
int STATUS_UNKNOWN = 0x200;
|
int STATUS_UNKNOWN = 0x200;
|
||||||
int STATUS_CHECKING = 0x201;
|
int STATUS_CHECKING = 0x201;
|
||||||
@ -14,6 +15,7 @@ public interface Downloadable {
|
|||||||
int STATUS_OFFER_CHECK_FILESIZE = 0x206;
|
int STATUS_OFFER_CHECK_FILESIZE = 0x206;
|
||||||
int STATUS_UPLOADING = 0x207;
|
int STATUS_UPLOADING = 0x207;
|
||||||
|
|
||||||
|
|
||||||
boolean start();
|
boolean start();
|
||||||
|
|
||||||
int getStatus();
|
int getStatus();
|
||||||
|
@ -497,7 +497,8 @@ public class Message extends AbstractEntity {
|
|||||||
} else {
|
} else {
|
||||||
return Decision.NEVER;
|
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;
|
return Decision.SHOULD;
|
||||||
} else {
|
} else {
|
||||||
return Decision.NEVER;
|
return Decision.NEVER;
|
||||||
|
Loading…
Reference in New Issue
Block a user