1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 02:39:42 +02: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

@ -204,7 +204,7 @@ public class OpenPgpPubSubUtil {
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection, BareJid contact)
throws InterruptedException, XMPPException.XMPPErrorException, SmackException.NoResponseException,
PubSubException.NotALeafNodeException, SmackException.NotConnectedException, PubSubException.NotAPubSubNodeException {
PubSubManager pm = PubSubManager.getInstance(connection, contact);
PubSubManager pm = PubSubManager.getInstanceFor(connection, contact);
LeafNode node = getLeafNode(pm, PEP_NODE_PUBLIC_KEYS);
List<PayloadItem<PublicKeysListElement>> list = node.getItems(1);
@ -274,7 +274,7 @@ public class OpenPgpPubSubUtil {
public static PubkeyElement fetchPubkey(XMPPConnection connection, BareJid contact, OpenPgpV4Fingerprint v4_fingerprint)
throws InterruptedException, XMPPException.XMPPErrorException, PubSubException.NotAPubSubNodeException,
PubSubException.NotALeafNodeException, SmackException.NotConnectedException, SmackException.NoResponseException {
PubSubManager pm = PubSubManager.getInstance(connection, contact);
PubSubManager pm = PubSubManager.getInstanceFor(connection, contact);
String nodeName = PEP_NODE_PUBLIC_KEY(v4_fingerprint);
LeafNode node = getLeafNode(pm, nodeName);