Setup Roster before sending initial presence

Thanks to Phil Winder for reporting the issue.
This commit is contained in:
Florian Schmaus 2014-10-20 21:58:20 +02:00
parent 47e327f2e6
commit 5ad4e85ed5
1 changed files with 5 additions and 0 deletions

View File

@ -453,6 +453,11 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
// eventually load the roster. And we should load the roster before we
// send the initial presence.
if (config.isSendPresence() && !resumed) {
if (!isAnonymous()) {
// Make sure that the roster has setup its listeners prior sending the initial presence by calling
// getRoster()
getRoster();
}
sendPacket(new Presence(Presence.Type.available));
}
}