# HG changeset patch # User Kim Alvefur # Date 1326655313 -3600 # Node ID 6be3a130c810c61d2abe31305df5e922b57374a6 # Parent 66de25ffc8d974bdf91c6a96dae4b9019ab31d77 mod_mam: Store the message id more accessible. diff -r 66de25ffc8d9 -r 6be3a130c810 mod_mam/mod_mam.lua --- a/mod_mam/mod_mam.lua Sun Jan 15 03:58:54 2012 +0100 +++ b/mod_mam/mod_mam.lua Sun Jan 15 20:21:53 2012 +0100 @@ -222,12 +222,14 @@ module:log("debug", "Archiving stanza: %s", stanza:top_tag()); -- Stamp "We archived this" on the message - stanza:tag("archived", { xmlns = xmlns_mam, by = host, id = uuid() }); + local id = uuid(); + stanza:tag("archived", { xmlns = xmlns_mam, by = host, id = id }); local when = time_now(); -- And stash it dm_list_append(store_user, store_host, "archive2", { -- WARNING This format may change. + id = id, when = when, -- This might be an UNIX timestamp. Probably. timestamp = timestamp(when), -- Textual timestamp. But I'll assume that comparing numbers is faster and less annoying in case of timezones. with = target_jid,