mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 05:52:06 +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:
parent
8c9b3d5c62
commit
b06c3e3607
1 changed files with 3 additions and 2 deletions
|
@ -448,7 +448,8 @@ public class Roster {
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
return 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;
|
return null;
|
||||||
}
|
}
|
||||||
String key = user;
|
String key = user;
|
||||||
if (!contains(user)) {
|
if (!entries.containsKey(user)) {
|
||||||
key = XmppStringUtils.parseBareJid(user);
|
key = XmppStringUtils.parseBareJid(user);
|
||||||
}
|
}
|
||||||
return key.toLowerCase(Locale.US);
|
return key.toLowerCase(Locale.US);
|
||||||
|
|
Loading…
Reference in a new issue