about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/iq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index b36ca229..e6d34d9d 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -2508,7 +2508,13 @@ iq_mam_request(ProfChatWin *win)
 
     xmpp_ctx_t * const ctx = connection_get_ctx();
     char *id = connection_create_stanza_id();
-    xmpp_stanza_t *iq = stanza_create_mam_iq(ctx, win->barejid, "2020-01-06T00:00:00Z");
+
+    GDateTime *timestamp = g_date_time_new_now_local();
+    timestamp = g_date_time_add_days(timestamp, -1);
+    gchar *datestr = g_date_time_format(timestamp,"%FT%T%:::z");
+    xmpp_stanza_t *iq = stanza_create_mam_iq(ctx, win->barejid, datestr);
+    g_free(datestr);
+    g_date_time_unref(timestamp);
 
 //    iq_id_handler_add(id, _http_upload_response_id_handler, NULL, upload);
     free(id);