From 54b57326b89628601d1cd9fb55cbe0f08392e9e4 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 4 May 2022 13:46:02 +0200 Subject: [PATCH] ox: have metadata node open Should have been done alogn with e9f218cdf6e15f4469d77cbaee59cc8501ed4e82. Like this people who are not in the roster can get our public key and write messages to use. --- src/xmpp/ox.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); }