Software /
code /
prosody
Comparison
plugins/mod_mam/mod_mam.lua @ 7846:22275bc5744a
mod_mam: Add XEP-0359 tag
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 19 Nov 2016 18:29:08 +0100 |
parent | 7845:eeb22f912577 |
child | 7848:efe5232793aa |
comparison
equal
deleted
inserted
replaced
7845:eeb22f912577 | 7846:22275bc5744a |
---|---|
270 log("debug", "Archiving stanza: %s", stanza:top_tag()); | 270 log("debug", "Archiving stanza: %s", stanza:top_tag()); |
271 | 271 |
272 -- And stash it | 272 -- And stash it |
273 local ok, id = archive:append(store_user, nil, stanza, time_now(), with); | 273 local ok, id = archive:append(store_user, nil, stanza, time_now(), with); |
274 if ok then | 274 if ok then |
275 stanza:tag("stanza-id", { xmlns = "urn:xmpp:sid:0", by = store_user.."@"..host, id = id }):up(); | |
275 if cleanup then cleanup[store_user] = true; end | 276 if cleanup then cleanup[store_user] = true; end |
276 module:fire_event("archive-message-added", { origin = origin, stanza = stanza, for_user = store_user, id = id }); | 277 module:fire_event("archive-message-added", { origin = origin, stanza = stanza, for_user = store_user, id = id }); |
277 end | 278 end |
278 else | 279 else |
279 log("debug", "Not archiving stanza: %s (prefs)", stanza:top_tag()); | 280 log("debug", "Not archiving stanza: %s (prefs)", stanza:top_tag()); |