diff options
author | Michael Vetter <jubalh@iodoru.org> | 2022-05-03 18:20:11 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2022-05-03 18:20:11 +0200 |
commit | e9f218cdf6e15f4469d77cbaee59cc8501ed4e82 (patch) | |
tree | 4a243cc7e1cab231d16610546b24d4ca27209ea2 /src/xmpp | |
parent | 411887e4434e02cc2a37323b5d34ce5bfa1637d2 (diff) | |
download | profani-tty-e9f218cdf6e15f4469d77cbaee59cc8501ed4e82.tar.gz |
ox: use pubsub acces model open when announce ox public key
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/ox.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xmpp/ox.c b/src/xmpp/ox.c index 0fa5cece..ce43ed89 100644 --- a/src/xmpp/ox.c +++ b/src/xmpp/ox.c @@ -143,6 +143,13 @@ ox_announce_public_key(const char* const filename) xmpp_stanza_add_child(publish, item); 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"); + } + xmpp_send(connection_get_conn(), iq); _ox_metadata_node__public_key(fp); |