# HG changeset patch # User Kim Alvefur # Date 1495285136 -7200 # Node ID 1dc6efcc420a2b5ebeaee41acd0016e3a7085aee # Parent d44c6582059d00dd48582493227578a3a530658e mod_mam: Attach stanza-id to original stanza (fixes #917) diff -r d44c6582059d -r 1dc6efcc420a plugins/mod_mam/mod_mam.lua --- a/plugins/mod_mam/mod_mam.lua Thu May 18 01:59:55 2017 +0200 +++ b/plugins/mod_mam/mod_mam.lua Sat May 20 14:58:56 2017 +0200 @@ -290,7 +290,7 @@ local ok = archive:append(store_user, nil, stanza, time_now(), with); if ok then local id = ok; - stanza:tag("stanza-id", { xmlns = xmlns_st_id, by = store_user.."@"..host, id = id }):up(); + event.stanza:tag("stanza-id", { xmlns = xmlns_st_id, by = store_user.."@"..host, id = id }):up(); 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