From 49cefd1c0ccbd727fe13bc0c5f0ed3dfe7ebca15 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 29 May 2016 20:44:58 +0200 Subject: handle app links invites in the form of https://conversations/i/localpart/domainpart --- src/main/AndroidManifest.xml | 9 +++++++++ src/main/java/eu/siacs/conversations/utils/XmppUri.java | 12 +++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 182a8ee9..90727b8c 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -76,6 +76,15 @@ + + + + + + + + + segments = uri.getPathSegments(); + if ("https".equalsIgnoreCase(scheme) && "conversations.im".equalsIgnoreCase(host) && segments.size() >= 3) { + // sample : https://conversations.im/i/foo/bar.com + jid = segments.get(1)+"@"+segments.get(2); + } else if ("xmpp".equalsIgnoreCase(scheme)) { + // sample: xmpp:foo@bar.com muc = "join".equalsIgnoreCase(uri.getQuery()); if (uri.getAuthority() != null) { jid = uri.getAuthority(); @@ -42,7 +48,7 @@ public class XmppUri { } fingerprint = parseFingerprint(uri.getQuery()); } else if ("imto".equalsIgnoreCase(scheme)) { - // sample: imto://xmpp/jid@foo.com + // sample: imto://xmpp/foo@bar.com try { jid = URLDecoder.decode(uri.getEncodedPath(), "UTF-8").split("/")[1]; } catch (final UnsupportedEncodingException ignored) { -- cgit v1.2.3