diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-02-09 14:34:49 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-02-09 14:34:49 +0100 |
commit | 7aa49998425b768244715b19c9779202c0145230 (patch) | |
tree | 9c26023bfe027ac232df19a8e041fdd15265e5b1 /src/main/java/de/pixart/messenger/utils | |
parent | 42c3129b66fe555c37fa67b6421230199cc64968 (diff) |
show web link previews in chat
fixes #113
Diffstat (limited to 'src/main/java/de/pixart/messenger/utils')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/XmppUri.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/XmppUri.java b/src/main/java/de/pixart/messenger/utils/XmppUri.java index 1ee90aa84..64f28cbab 100644 --- a/src/main/java/de/pixart/messenger/utils/XmppUri.java +++ b/src/main/java/de/pixart/messenger/utils/XmppUri.java @@ -8,6 +8,7 @@ import java.net.URLDecoder; import java.util.ArrayList; import java.util.List; import java.util.Locale; +import java.util.regex.Pattern; import de.pixart.messenger.Config; import rocks.xmpp.addr.Jid; @@ -27,6 +28,8 @@ public class XmppUri { public static final String ACTION_JOIN = "join"; public static final String ACTION_MESSAGE = "message"; + public static Pattern XMPP_URI = Patterns.XMPP_PATTERN; + public XmppUri(String uri) { try { parse(Uri.parse(uri)); @@ -43,11 +46,6 @@ public class XmppUri { parse(uri); } - public static boolean isXmppUri(String uri) { - String scheme = Uri.parse(uri).getScheme(); - return "xmpp".equalsIgnoreCase(scheme); - } - public XmppUri(Uri uri, boolean safeSource) { this.safeSource = safeSource; parse(uri); |