diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-06-01 09:46:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 09:46:35 +0200 |
commit | 45c930eaa565752062ca5acd4df0cb3003fbca88 (patch) | |
tree | ae493971f07003eaf2def053dc882f7933b67dad /src/xmpp/omemo.c | |
parent | 956fd547c1beaeb1254b2899f1f3576f5511128a (diff) | |
parent | 41913a0aea082c953952fe31d81c72a101d2cca9 (diff) | |
download | profani-tty-45c930eaa565752062ca5acd4df0cb3003fbca88.tar.gz |
Merge pull request #1548 from DebXWoody/bugfix/bugfix1538
OMEMO - Notify user when unable to publish own device list
Diffstat (limited to 'src/xmpp/omemo.c')
-rw-r--r-- | src/xmpp/omemo.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/xmpp/omemo.c b/src/xmpp/omemo.c index 773d6224..54cd12ad 100644 --- a/src/xmpp/omemo.c +++ b/src/xmpp/omemo.c @@ -51,6 +51,8 @@ static int _omemo_bundle_publish_result(xmpp_stanza_t* const stanza, void* const static int _omemo_bundle_publish_configure(xmpp_stanza_t* const stanza, void* const userdata); static int _omemo_bundle_publish_configure_result(xmpp_stanza_t* const stanza, void* const userdata); +static int _omemo_device_list_publish_result(xmpp_stanza_t* const stanza, void* const userdata); + void omemo_devicelist_subscribe(void) { @@ -71,6 +73,8 @@ omemo_devicelist_publish(GList* device_list) stanza_attach_publish_options(ctx, iq, "pubsub#access_model", "open"); } + iq_id_handler_add(xmpp_stanza_get_id(iq), _omemo_device_list_publish_result, NULL, NULL); + iq_send_stanza(iq); xmpp_stanza_release(iq); } @@ -608,3 +612,15 @@ _omemo_bundle_publish_configure_result(xmpp_stanza_t* const stanza, void* const return 0; } + +static int +_omemo_device_list_publish_result(xmpp_stanza_t* const stanza, void* const userdata) +{ + const char* type = xmpp_stanza_get_type(stanza); + if (g_strcmp0(type, STANZA_TYPE_ERROR) == 0) { + cons_show_error("Unable to publish own OMEMO device list"); + log_error("[OMEMO] Publishing device list failed"); + return 0; + } + return 0; +} |