mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 00:02:06 +01:00
Minor logic fix.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1886 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
3bf804d94d
commit
5ae662a257
1 changed files with 2 additions and 1 deletions
|
@ -138,12 +138,13 @@ public class GroupChat {
|
|||
// field is in the form "roomName@service/nickname"
|
||||
Presence joinPresence = new Presence(Presence.Type.AVAILABLE);
|
||||
joinPresence.setTo(room + "/" + nickname);
|
||||
connection.sendPacket(joinPresence);
|
||||
// Wait for a presence packet back from the server.
|
||||
PacketFilter responseFilter = new AndFilter(
|
||||
new FromContainsFilter(room + "/" + nickname),
|
||||
new PacketTypeFilter(Presence.class));
|
||||
PacketCollector response = connection.createPacketCollector(responseFilter);
|
||||
// Send join packet.
|
||||
connection.sendPacket(joinPresence);
|
||||
// Wait up to five seconds for a reply.
|
||||
Presence presence = (Presence)response.nextResult(5000);
|
||||
if (presence == null) {
|
||||
|
|
Loading…
Reference in a new issue