made contact jids lower case
This commit is contained in:
parent
99eb1743e3
commit
c68777c67c
|
@ -1,6 +1,7 @@
|
||||||
package eu.siacs.conversations.entities;
|
package eu.siacs.conversations.entities;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
@ -78,7 +79,7 @@ public class Contact {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getJid() {
|
public String getJid() {
|
||||||
return this.jid;
|
return this.jid.toLowerCase(Locale.getDefault());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean match(String needle) {
|
public boolean match(String needle) {
|
||||||
|
|
|
@ -2,6 +2,7 @@ package eu.siacs.conversations.entities;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class Roster {
|
public class Roster {
|
||||||
|
@ -19,7 +20,7 @@ public class Roster {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Contact getContact(String jid) {
|
public Contact getContact(String jid) {
|
||||||
String cleanJid = jid.split("/")[0];
|
String cleanJid = jid.split("/")[0].toLowerCase(Locale.getDefault());
|
||||||
if (contacts.containsKey(cleanJid)) {
|
if (contacts.containsKey(cleanJid)) {
|
||||||
return contacts.get(cleanJid);
|
return contacts.get(cleanJid);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue