aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-01 08:46:15 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-01 08:46:15 +0200
commit9a8768468951ffd485a4a08269920772d2d1c39c (patch)
tree87aa204f7a8bca36656fc704548ff7f512b5e2b8 /src
parent3831b987f76e2b0b143b45619a455d7ec4625bcd (diff)
add publish-options helper class
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java4
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/pep/PublishOptions.java17
2 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 6aea5c8cf..5f075bf7e 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -2737,6 +2737,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) {
sendIqPacket(account, mIqGenerator.requestPubsubConfiguration(jid, node), new OnIqPacketReceived() {
@Override
diff --git a/src/main/java/de/pixart/messenger/xmpp/pep/PublishOptions.java b/src/main/java/de/pixart/messenger/xmpp/pep/PublishOptions.java
new file mode 100644
index 000000000..534f4005c
--- /dev/null
+++ b/src/main/java/de/pixart/messenger/xmpp/pep/PublishOptions.java
@@ -0,0 +1,17 @@
+package de.pixart.messenger.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;
+ }
+
+} \ No newline at end of file