diff --git a/src/xmpp/omemo.c b/src/xmpp/omemo.c index 6c57781b..4fcca699 100644 --- a/src/xmpp/omemo.c +++ b/src/xmpp/omemo.c @@ -23,11 +23,9 @@ omemo_devicelist_publish(GList *device_list) xmpp_ctx_t * const ctx = connection_get_ctx(); xmpp_stanza_t *iq = stanza_create_omemo_devicelist_publish(ctx, device_list); - Jid *jid = jid_create(connection_get_fulljid()); - if (caps_jid_has_feature(jid->barejid, XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) { + if (connection_supports(XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) { stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open"); } - jid_destroy(jid); iq_send_stanza(iq); xmpp_stanza_release(iq); @@ -74,11 +72,9 @@ omemo_bundle_publish(void) g_list_free(lengths); g_list_free(ids); - Jid *jid = jid_create(connection_get_fulljid()); - if (caps_jid_has_feature(jid->barejid, XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) { + if (connection_supports(XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) { stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open"); } - jid_destroy(jid); iq_send_stanza(iq); xmpp_stanza_release(iq);