mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 15:32:06 +01:00
Remove OmemoManager.resourceSupportsOmemo()
since there is currently no way to determine if a full JID supports OMEMO.
This commit is contained in:
parent
7b5eecb821
commit
2050b2f8b9
1 changed files with 0 additions and 20 deletions
|
@ -19,7 +19,6 @@ package org.jivesoftware.smackx.omemo;
|
||||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.BODY_OMEMO_HINT;
|
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.BODY_OMEMO_HINT;
|
||||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.OMEMO;
|
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.OMEMO;
|
||||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.OMEMO_NAMESPACE_V_AXOLOTL;
|
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.OMEMO_NAMESPACE_V_AXOLOTL;
|
||||||
import static org.jivesoftware.smackx.omemo.util.OmemoConstants.PEP_NODE_DEVICE_LIST_NOTIFY;
|
|
||||||
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -79,7 +78,6 @@ import org.jxmpp.jid.BareJid;
|
||||||
import org.jxmpp.jid.DomainBareJid;
|
import org.jxmpp.jid.DomainBareJid;
|
||||||
import org.jxmpp.jid.EntityBareJid;
|
import org.jxmpp.jid.EntityBareJid;
|
||||||
import org.jxmpp.jid.EntityFullJid;
|
import org.jxmpp.jid.EntityFullJid;
|
||||||
import org.jxmpp.jid.FullJid;
|
|
||||||
import org.jxmpp.jid.impl.JidCreate;
|
import org.jxmpp.jid.impl.JidCreate;
|
||||||
import org.jxmpp.stringprep.XmppStringprepException;
|
import org.jxmpp.stringprep.XmppStringprepException;
|
||||||
|
|
||||||
|
@ -493,24 +491,6 @@ public final class OmemoManager extends Manager {
|
||||||
.getActiveDevices().isEmpty();
|
.getActiveDevices().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true, if the device resource has announced OMEMO support.
|
|
||||||
* Throws an IllegalArgumentException if the provided FullJid does not have a resource part.
|
|
||||||
*
|
|
||||||
* @param fullJid jid of a resource
|
|
||||||
* @return true if resource supports OMEMO
|
|
||||||
* @throws XMPPException.XMPPErrorException if
|
|
||||||
* @throws SmackException.NotConnectedException something
|
|
||||||
* @throws InterruptedException goes
|
|
||||||
* @throws SmackException.NoResponseException wrong
|
|
||||||
*/
|
|
||||||
public boolean resourceSupportsOmemo(FullJid fullJid) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException {
|
|
||||||
if (fullJid.hasNoResource()) {
|
|
||||||
throw new IllegalArgumentException("Jid " + fullJid + " has no resource part.");
|
|
||||||
}
|
|
||||||
return ServiceDiscoveryManager.getInstanceFor(connection()).discoverInfo(fullJid).containsFeature(PEP_NODE_DEVICE_LIST_NOTIFY);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true, if the MUC with the EntityBareJid multiUserChat is non-anonymous and members only (prerequisite
|
* Returns true, if the MUC with the EntityBareJid multiUserChat is non-anonymous and members only (prerequisite
|
||||||
* for OMEMO encryption in MUC).
|
* for OMEMO encryption in MUC).
|
||||||
|
|
Loading…
Reference in a new issue