Software /
code /
prosody-modules
Changeset
2515:4cb549622862
mod_mam: Fix to expect archive id as first return value from archive:append
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 20 Feb 2017 01:58:00 +0100 |
parents | 2514:d47a7e6e9adc |
children | 2516:248054199d0f |
files | mod_mam/mod_mam.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua Mon Feb 20 01:47:44 2017 +0100 +++ b/mod_mam/mod_mam.lua Mon Feb 20 01:58:00 2017 +0100 @@ -286,8 +286,9 @@ log("debug", "Archiving stanza: %s", stanza:top_tag()); -- And stash it - local ok, id = archive:append(store_user, nil, stanza, time_now(), with); + local ok = archive:append(store_user, nil, stanza, time_now(), with); if ok then + local id = ok; if cleanup then cleanup[store_user] = true; end module:fire_event("archive-message-added", { origin = origin, stanza = stanza, for_user = store_user, id = id }); end