mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 07:29:36 +00:00
Convert vCard attachments to Shared Contacts.
When you share a vCard from an external app (like the Contacts app) into Signal, we'll now convert it to a pretty Shared Contact message and allow you to choose which fields of the contact you wish to send.
This commit is contained in:
@@ -44,6 +44,7 @@ public class MediaUtil {
|
||||
public static final String AUDIO_AAC = "audio/aac";
|
||||
public static final String AUDIO_UNSPECIFIED = "audio/*";
|
||||
public static final String VIDEO_UNSPECIFIED = "video/*";
|
||||
public static final String VCARD = "text/x-vcard";
|
||||
|
||||
|
||||
public static Slide getSlideForAttachment(Context context, Attachment attachment) {
|
||||
@@ -196,6 +197,10 @@ public class MediaUtil {
|
||||
return !TextUtils.isEmpty(contentType) && contentType.trim().startsWith("video/");
|
||||
}
|
||||
|
||||
public static boolean isVcard(String contentType) {
|
||||
return !TextUtils.isEmpty(contentType) && contentType.trim().equals(VCARD);
|
||||
}
|
||||
|
||||
public static boolean isGif(String contentType) {
|
||||
return !TextUtils.isEmpty(contentType) && contentType.trim().equals("image/gif");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user