mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 16:22:06 +01:00
Setup Roster before sending initial presence
Thanks to Phil Winder for reporting the issue.
This commit is contained in:
parent
47e327f2e6
commit
5ad4e85ed5
1 changed files with 5 additions and 0 deletions
|
@ -453,6 +453,11 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
// eventually load the roster. And we should load the roster before we
|
// eventually load the roster. And we should load the roster before we
|
||||||
// send the initial presence.
|
// send the initial presence.
|
||||||
if (config.isSendPresence() && !resumed) {
|
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));
|
sendPacket(new Presence(Presence.Type.available));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue