add publish-options helper class
This commit is contained in:
parent
90afaab8ed
commit
cbbf6f439b
|
@ -2569,6 +2569,10 @@ public class XmppConnectionService extends Service {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void pushNodeConfiguration(Account account, final String node, final Bundle options, final OnConfigurationPushed callback) {
|
||||||
|
pushNodeConfiguration(account,account.getJid().toBareJid(),node,options,callback);
|
||||||
|
}
|
||||||
|
|
||||||
public void pushNodeConfiguration(Account account, final Jid jid, final String node, final Bundle options, final OnConfigurationPushed callback) {
|
public void pushNodeConfiguration(Account account, final Jid jid, final String node, final Bundle options, final OnConfigurationPushed callback) {
|
||||||
sendIqPacket(account, mIqGenerator.requestPubsubConfiguration(jid,node), new OnIqPacketReceived() {
|
sendIqPacket(account, mIqGenerator.requestPubsubConfiguration(jid,node), new OnIqPacketReceived() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package eu.siacs.conversations.xmpp.pep;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
public class PublishOptions {
|
||||||
|
|
||||||
|
private PublishOptions() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Bundle openAccess() {
|
||||||
|
final Bundle options = new Bundle();
|
||||||
|
options.putString("pubsub#access_model","open");
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue