diff options
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 14 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Transferable.java | 52 |
2 files changed, 63 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 9f9f34cf8..3a73f78bf 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -20,6 +20,7 @@ import java.util.Iterator; import java.util.List; import eu.siacs.conversations.Config; +import eu.siacs.conversations.R; import eu.siacs.conversations.xmpp.chatstate.ChatState; import eu.siacs.conversations.xmpp.jid.InvalidJidException; import eu.siacs.conversations.xmpp.jid.Jid; @@ -344,6 +345,19 @@ public class Conversation extends AbstractEntity implements Blockable { } } + public String getParticipants() { + if (getMode() == MODE_MULTI) { + String generatedName = getMucOptions().createNameFromParticipants(); + if (generatedName != null) { + return generatedName; + } else { + return null; //getJid().getLocalpart(); + } + } else { + return null; + } + } + public String getAccountUuid() { return this.accountUuid; } diff --git a/src/main/java/eu/siacs/conversations/entities/Transferable.java b/src/main/java/eu/siacs/conversations/entities/Transferable.java index 2db6e3c98..6a3464a69 100644 --- a/src/main/java/eu/siacs/conversations/entities/Transferable.java +++ b/src/main/java/eu/siacs/conversations/entities/Transferable.java @@ -2,9 +2,55 @@ package eu.siacs.conversations.entities; public interface Transferable { - String[] VALID_IMAGE_EXTENSIONS = {"webp", "jpeg", "jpg", "png", "jpe"}; - String[] VALID_CRYPTO_EXTENSIONS = {"pgp", "gpg", "otr"}; - String[] WELL_KNOWN_EXTENSIONS = {"pdf","m4a"}; + String[] VALID_IMAGE_EXTENSIONS = { + "webp", + "jpeg", + "jpg", + "png", + "jpe", + "gif", + "tif" + }; + String[] VALID_CRYPTO_EXTENSIONS = { + "pgp", + "gpg", + "otr" + }; + String[] WELL_KNOWN_EXTENSIONS = { + //documents + "pdf", + "doc", + "docx", + "txt", + //audio + "m4a", + "m4b", + "mp3", + "mp2", + "wav", + "aac", + "aif", + "aiff", + "aifc", + "mid", + "midi", + //video + "avi", + "mp4", + "mpeg", + "mpg", + "mpe", + "mov", + "3gp", + //applications + "apk", + //calendar + "vcf", + //compressed + "zip", + "rar", + + }; int STATUS_UNKNOWN = 0x200; int STATUS_CHECKING = 0x201; |