1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 05:51:08 +01:00

Add PubSubManager.getInstanceFor() just like all other Managers

and deprecate PubSubManager.getInstance().
This commit is contained in:
Florian Schmaus 2019-04-16 10:09:01 +02:00
parent 99bf8316f5
commit d97fb126a1
8 changed files with 40 additions and 14 deletions

View file

@ -147,7 +147,7 @@ public final class MoodManager extends Manager {
throws SmackException.NotLoggedInException, InterruptedException, PubSubException.NotALeafNodeException,
XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException {
if (pubSubManager == null) {
pubSubManager = PubSubManager.getInstance(getAuthenticatedConnectionOrThrow(), connection().getUser().asBareJid());
pubSubManager = PubSubManager.getInstanceFor(getAuthenticatedConnectionOrThrow(), connection().getUser().asBareJid());
}
LeafNode node = pubSubManager.getOrCreateLeafNode(MOOD_NODE);