1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01:00

Use getPresenceMapKey() in Roster.getEntry()

In order to use the bare JID as key for the entries Map if no entry for
the full JID exists already, otherwise use the full JID.
This commit is contained in:
Florian Schmaus 2015-01-19 18:36:31 +01:00
parent 8c9b3d5c62
commit b06c3e3607

View file

@ -448,7 +448,8 @@ public class Roster {
if (user == null) {
return null;
}
return entries.get(user.toLowerCase(Locale.US));
String key = getPresenceMapKey(user);
return entries.get(key);
}
/**
@ -714,7 +715,7 @@ public class Roster {
return null;
}
String key = user;
if (!contains(user)) {
if (!entries.containsKey(user)) {
key = XmppStringUtils.parseBareJid(user);
}
return key.toLowerCase(Locale.US);