Wait for discovery end to publish omemo devicelist and bundle
Add sv_ev_connection_features_received for that purpose
This commit is contained in:
@@ -28,7 +28,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);
|
||||
|
||||
stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open");
|
||||
if (connection_supports(XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) {
|
||||
stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open");
|
||||
}
|
||||
|
||||
iq_send_stanza(iq);
|
||||
xmpp_stanza_release(iq);
|
||||
@@ -76,7 +78,9 @@ omemo_bundle_publish(gboolean first)
|
||||
g_list_free(lengths);
|
||||
g_list_free(ids);
|
||||
|
||||
stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open");
|
||||
if (connection_supports(XMPP_FEATURE_PUBSUB_PUBLISH_OPTIONS)) {
|
||||
stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open");
|
||||
}
|
||||
|
||||
iq_id_handler_add(id, _omemo_bundle_publish_result, NULL, GINT_TO_POINTER(first));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user