M src/main/AndroidManifest.xml => src/main/AndroidManifest.xml +8 -0
@@ 142,6 142,14 @@
<data android:scheme="imto" />
<data android:host="jabber" />
</intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.SENDTO" />
+
+ <category android:name="android.intent.category.DEFAULT" />
+
+ <data android:scheme="imto" />
+ <data android:host="xmpp" />
+ </intent-filter>
</activity>
<activity
android:name=".ui.StartConversationActivity"
M src/main/java/eu/siacs/conversations/utils/XmppUri.java => src/main/java/eu/siacs/conversations/utils/XmppUri.java +2 -1
@@ 12,6 12,7 @@ import com.google.common.collect.ImmutableMap;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
@@ 169,7 170,7 @@ public class XmppUri {
}
}
this.fingerprints = parseFingerprints(parameters);
- } else if ("imto".equalsIgnoreCase(scheme)) {
+ } else if ("imto".equalsIgnoreCase(scheme) && Arrays.asList("xmpp", "jabber").contains(uri.getHost())) {
// sample: imto://xmpp/foo@bar.com
try {
jid = URLDecoder.decode(uri.getEncodedPath(), "UTF-8").split("/")[1].trim();