From 69e35e86b206e8c887907c84da4e32a01cedab04 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 28 Oct 2020 14:21:37 +0100 Subject: mam: Use correct ID in rsm handler Thanks to DebXWoody for the help. --- src/xmpp/iq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/xmpp/iq.c') diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 7248bbd4..4e7aec4a 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -2550,7 +2550,6 @@ iq_mam_request(ProfChatWin* win) } xmpp_ctx_t* const ctx = connection_get_ctx(); - char* id = connection_create_stanza_id(); GDateTime* now = g_date_time_new_now_utc(); GDateTime* timestamp = g_date_time_add_days(now, -1); @@ -2560,8 +2559,7 @@ iq_mam_request(ProfChatWin* win) g_free(datestr); g_date_time_unref(timestamp); - iq_id_handler_add(id, _mam_rsm_id_handler, NULL, NULL); - free(id); + iq_id_handler_add(xmpp_stanza_get_id(iq), _mam_rsm_id_handler, NULL, NULL); iq_send_stanza(iq); xmpp_stanza_release(iq); -- cgit 1.4.1-2-gfad0