mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Add PubSubManager.getInstanceFor() just like all other Managers
and deprecate PubSubManager.getInstance().
This commit is contained in:
parent
99bf8316f5
commit
d97fb126a1
8 changed files with 40 additions and 14 deletions
|
@ -125,7 +125,7 @@ public class OmemoManagerSetupHelper {
|
|||
}
|
||||
|
||||
public static void cleanUpPubSub(OmemoManager omemoManager) {
|
||||
PubSubManager pm = PubSubManager.getInstance(omemoManager.getConnection(),omemoManager.getOwnJid());
|
||||
PubSubManager pm = PubSubManager.getInstanceFor(omemoManager.getConnection(),omemoManager.getOwnJid());
|
||||
try {
|
||||
omemoManager.requestDeviceListUpdateFor(omemoManager.getOwnJid());
|
||||
} catch (SmackException.NotConnectedException | InterruptedException | SmackException.NoResponseException | PubSubException.NotALeafNodeException | XMPPException.XMPPErrorException e) {
|
||||
|
|
|
@ -42,7 +42,7 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
|
|||
if (pubSubService == null) {
|
||||
throw new TestNotPossibleException("No PubSub service found");
|
||||
}
|
||||
pubSubManagerOne = PubSubManager.getInstance(conOne, pubSubService);
|
||||
pubSubManagerOne = PubSubManager.getInstanceFor(conOne, pubSubService);
|
||||
if (!pubSubManagerOne.canCreateNodesAndPublishItems()) {
|
||||
throw new TestNotPossibleException("PubSub service does not allow node creation");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue