# HG changeset patch # User Kim Alvefur # Date 1487552280 -3600 # Node ID 4cb5496228627a6dc6830a1edd2a62f1cbe35a98 # Parent d47a7e6e9adcaab8230aef8b6ec1320e0bd837d1 mod_mam: Fix to expect archive id as first return value from archive:append diff -r d47a7e6e9adc -r 4cb549622862 mod_mam/mod_mam.lua --- 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