1
0
Fork 0

Fix when feature discovery is finished

Feature discovery was marked as finished once we received a reply to the
initial request. The discovery mechanism allows to delegate the real
feature discovery to another service running on different domain and those
requests are created dynamically.

This was another instance causing the warning message described in #1940

Fixes #1940 (once more)

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel 2023-12-28 19:08:44 +01:00
parent 605ee6e99a
commit f458d6ebdf
4 changed files with 14 additions and 1 deletions

View File

@ -58,6 +58,7 @@
#include "ui/window.h"
#include "tools/bookmark_ignore.h"
#include "xmpp/xmpp.h"
#include "xmpp/iq.h"
#include "xmpp/muc.h"
#include "xmpp/chat_session.h"
#include "xmpp/roster_list.h"
@ -196,6 +197,7 @@ sv_ev_roster_received(void)
void
sv_ev_connection_features_received(void)
{
iq_feature_retrieval_complete_handler();
#ifdef HAVE_OMEMO
omemo_publish_crypto_materials();
#endif

View File

@ -2539,7 +2539,6 @@ _disco_items_result_handler(xmpp_stanza_t* const stanza)
if (g_strcmp0(id, "discoitemsreq") == 0) {
cons_show_disco_items(items, from);
} else if (g_strcmp0(id, "discoitemsreq_onconnect") == 0) {
received_disco_items = TRUE;
connection_set_disco_items(items);
while (late_delivery_windows) {
@ -2554,6 +2553,12 @@ _disco_items_result_handler(xmpp_stanza_t* const stanza)
g_slist_free_full(items, (GDestroyNotify)_item_destroy);
}
void
iq_feature_retrieval_complete_handler(void)
{
received_disco_items = TRUE;
}
void
iq_send_stanza(xmpp_stanza_t* const stanza)
{

View File

@ -40,6 +40,7 @@ typedef int (*ProfIqCallback)(xmpp_stanza_t* const stanza, void* const userdata)
typedef void (*ProfIqFreeCallback)(void* userdata);
void iq_handlers_init(void);
void iq_feature_retrieval_complete_handler(void);
void iq_send_stanza(xmpp_stanza_t* const stanza);
void iq_id_handler_add(const char* const id, ProfIqCallback func, ProfIqFreeCallback free_func, void* userdata);
void iq_disco_info_request_onconnect(const char* jid);

View File

@ -450,6 +450,11 @@ iq_mam_request(ProfChatWin* win, GDateTime* enddate)
{
}
void
iq_feature_retrieval_complete_handler(void)
{
}
void
publish_user_mood(const char* const mood, const char* const text)
{