Software /
code /
prosody-modules
Changeset
559:6be3a130c810
mod_mam: Store the message id more accessible.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 15 Jan 2012 20:21:53 +0100 |
parents | 558:66de25ffc8d9 |
children | 560:b62f5e38f865 |
files | mod_mam/mod_mam.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,