1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Reset internal flag

Reset the `received_disco_items` flag when initializing the iq module.

This has caused the console error message "Server doesn't support MAM"
sometimes on reconnect.

Fixes #1940

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel 2023-11-16 13:29:08 +01:00
parent 6116702dd2
commit b250e3ec69
2 changed files with 3 additions and 2 deletions

View File

@ -259,6 +259,7 @@ iq_handlers_init(void)
int millis = prefs_get_autoping() * 1000; int millis = prefs_get_autoping() * 1000;
xmpp_timed_handler_add(conn, _autoping_timed_send, millis, ctx); xmpp_timed_handler_add(conn, _autoping_timed_send, millis, ctx);
} }
received_disco_items = FALSE;
iq_rooms_cache_clear(); iq_rooms_cache_clear();
iq_handlers_clear(); iq_handlers_clear();
@ -316,7 +317,7 @@ iq_handlers_remove_win(ProfWin* window)
} }
void void
iq_handlers_clear() iq_handlers_clear(void)
{ {
if (id_handlers) { if (id_handlers) {
g_hash_table_remove_all(id_handlers); g_hash_table_remove_all(id_handlers);

View File

@ -241,7 +241,7 @@ void iq_disable_carbons(void);
void iq_send_software_version(const char* const fulljid); void iq_send_software_version(const char* const fulljid);
void iq_rooms_cache_clear(void); void iq_rooms_cache_clear(void);
void iq_handlers_remove_win(ProfWin* window); void iq_handlers_remove_win(ProfWin* window);
void iq_handlers_clear(); void iq_handlers_clear(void);
void iq_room_list_request(gchar* conferencejid, gchar* filter); void iq_room_list_request(gchar* conferencejid, gchar* filter);
void iq_disco_info_request(gchar* jid); void iq_disco_info_request(gchar* jid);
void iq_disco_items_request(gchar* jid); void iq_disco_items_request(gchar* jid);