1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

mam: Use correct ID in rsm handler

Thanks to DebXWoody for the help.
This commit is contained in:
Michael Vetter 2020-10-28 14:21:37 +01:00
parent d06ca64098
commit 69e35e86b2

View File

@ -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);