about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/ox.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmpp/ox.c b/src/xmpp/ox.c
index 7e66abab..da05af89 100644
--- a/src/xmpp/ox.c
+++ b/src/xmpp/ox.c
@@ -277,6 +277,12 @@ _ox_metadata_node__public_key(const char* const fingerprint)
     xmpp_stanza_add_child(pubsub, publish);
     xmpp_stanza_add_child(iq, pubsub);
 
+    if (connection_supports(XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) {
+        stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open");
+    } else {
+        log_debug("[OX] Cannot publish public key: no PUBSUB feature announced");
+    }
+
     iq_send_stanza(iq);
     xmpp_stanza_release(iq);
 }