about summary refs log tree commit diff stats
path: root/src/xmpp/iq.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-10-28 14:21:37 +0100
committerMichael Vetter <jubalh@iodoru.org>2021-01-28 14:44:53 +0100
commit69e35e86b206e8c887907c84da4e32a01cedab04 (patch)
treed67fe3a9eca82ccc6ddb5425ea3e5144fed7e8c9 /src/xmpp/iq.c
parentd06ca640989070c364fde882b031df17765f88e6 (diff)
downloadprofani-tty-69e35e86b206e8c887907c84da4e32a01cedab04.tar.gz
mam: Use correct ID in rsm handler
Thanks to DebXWoody for the help.
Diffstat (limited to 'src/xmpp/iq.c')
-rw-r--r--src/xmpp/iq.c4
1 files changed, 1 insertions, 3 deletions
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);