mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-29 17:52:06 +01:00
Prevents adding items to groups with no name (NULL)
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2239 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
a8eeb87a64
commit
777f8937e4
1 changed files with 4 additions and 2 deletions
|
@ -248,7 +248,7 @@ public class Roster {
|
|||
}
|
||||
|
||||
/**
|
||||
* Cretaes a new roster entry and prsence subscription. The server will asynchronously
|
||||
* Creates a new roster entry and presence subscription. The server will asynchronously
|
||||
* update the roster with the subscription status.
|
||||
*
|
||||
* @param user the user.
|
||||
|
@ -263,9 +263,11 @@ public class Roster {
|
|||
RosterPacket.Item item = new RosterPacket.Item(user, name);
|
||||
if (groups != null) {
|
||||
for (int i=0; i<groups.length; i++) {
|
||||
if (groups[i] != null) {
|
||||
item.addGroupName(groups[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
rosterPacket.addRosterItem(item);
|
||||
// Wait up to a certain number of seconds for a reply from the server.
|
||||
PacketCollector collector = connection.createPacketCollector(
|
||||
|
|
Loading…
Reference in a new issue