mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02:00
Added support for pre-approved subscription requests (RFC 6121 § 3.4)
SMACK-639
This commit is contained in:
parent
f410ece468
commit
fae9d129a9
12 changed files with 440 additions and 5 deletions
|
@ -1405,7 +1405,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
return getFeature(element, namespace) != null;
|
||||
}
|
||||
|
||||
private void addStreamFeature(ExtensionElement feature) {
|
||||
protected void addStreamFeature(ExtensionElement feature) {
|
||||
String key = XmppStringUtils.generateKey(feature.getElementName(), feature.getNamespace());
|
||||
streamFeatures.put(key, feature);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.concurrent.BlockingQueue;
|
|||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.packet.Stanza;
|
||||
import org.jivesoftware.smack.packet.PlainStreamElement;
|
||||
import org.jivesoftware.smack.packet.TopLevelStreamElement;
|
||||
|
@ -191,6 +192,16 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
invokePacketCollectorsAndNotifyRecvListeners(packet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable stream feature.
|
||||
*
|
||||
* @param streamFeature the stream feature.
|
||||
* @since 4.2
|
||||
*/
|
||||
public void enableStreamFeature(ExtensionElement streamFeature) {
|
||||
addStreamFeature(streamFeature);
|
||||
}
|
||||
|
||||
public static DummyConnection newConnectedDummyConnection() {
|
||||
DummyConnection dummyConnection = new DummyConnection();
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue