1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

Merge pull request #1791 from MarcoPolo-PasTonMolo/fix/MAM_not_loading_recent_messages

Fix MAM not loading some recent messages
This commit is contained in:
Michael Vetter 2023-02-15 15:18:08 +01:00 committed by GitHub
commit 89b0744628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2660,15 +2660,15 @@ _iq_mam_request(ProfChatWin* win, GDateTime* startdate, GDateTime* enddate)
startdate_str = g_date_time_format(startdate, mam_timestamp_format_string);
fetch_next = TRUE;
g_date_time_unref(startdate);
} else if (!enddate) {
GDateTime* now = g_date_time_new_now_utc();
enddate_str = g_date_time_format(now, mam_timestamp_format_string);
g_date_time_unref(now);
}
if (enddate) {
enddate_str = g_date_time_format(enddate, mam_timestamp_format_string);
g_date_time_unref(enddate);
} else {
GDateTime* now = g_date_time_new_now_utc();
enddate_str = g_date_time_format(now, mam_timestamp_format_string);
g_date_time_unref(now);
}
xmpp_ctx_t* const ctx = connection_get_ctx();