made xmpp uris case insensitive
This commit is contained in:
parent
9c2e6392ec
commit
5003d1f549
|
@ -32,7 +32,7 @@ public class XmppUri {
|
||||||
|
|
||||||
protected void parse(Uri uri) {
|
protected void parse(Uri uri) {
|
||||||
String scheme = uri.getScheme();
|
String scheme = uri.getScheme();
|
||||||
if ("xmpp".equals(scheme)) {
|
if ("xmpp".equalsIgnoreCase(scheme)) {
|
||||||
// sample: xmpp:jid@foo.com
|
// sample: xmpp:jid@foo.com
|
||||||
muc = "join".equalsIgnoreCase(uri.getQuery());
|
muc = "join".equalsIgnoreCase(uri.getQuery());
|
||||||
if (uri.getAuthority() != null) {
|
if (uri.getAuthority() != null) {
|
||||||
|
@ -41,7 +41,7 @@ public class XmppUri {
|
||||||
jid = uri.getSchemeSpecificPart().split("\\?")[0];
|
jid = uri.getSchemeSpecificPart().split("\\?")[0];
|
||||||
}
|
}
|
||||||
fingerprint = parseFingerprint(uri.getQuery());
|
fingerprint = parseFingerprint(uri.getQuery());
|
||||||
} else if ("imto".equals(scheme)) {
|
} else if ("imto".equalsIgnoreCase(scheme)) {
|
||||||
// sample: imto://xmpp/jid@foo.com
|
// sample: imto://xmpp/jid@foo.com
|
||||||
try {
|
try {
|
||||||
jid = URLDecoder.decode(uri.getEncodedPath(), "UTF-8").split("/")[1];
|
jid = URLDecoder.decode(uri.getEncodedPath(), "UTF-8").split("/")[1];
|
||||||
|
@ -73,7 +73,7 @@ public class XmppUri {
|
||||||
|
|
||||||
public Jid getJid() {
|
public Jid getJid() {
|
||||||
try {
|
try {
|
||||||
return this.jid == null ? null :Jid.fromString(this.jid);
|
return this.jid == null ? null :Jid.fromString(this.jid.toLowerCase());
|
||||||
} catch (InvalidJidException e) {
|
} catch (InvalidJidException e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue