Mercurial > prosody-hg
comparison plugins/mod_mam/mod_mam.lua @ 10735:f2838ffcc499
mod_mam: Log 'why' a stanza is archived
Logging of 'why not' is already done. Why not both? Will make more sense
when the rules evolve a bit.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 21 Apr 2020 00:53:23 +0200 |
| parents | 136c41a3d03c |
| children | c5a3576a5335 |
comparison
equal
deleted
inserted
replaced
| 10734:136c41a3d03c | 10735:f2838ffcc499 |
|---|---|
| 321 clone_for_storage = stanza; | 321 clone_for_storage = stanza; |
| 322 end | 322 end |
| 323 | 323 |
| 324 -- Check with the users preferences | 324 -- Check with the users preferences |
| 325 if shall_store(store_user, with) then | 325 if shall_store(store_user, with) then |
| 326 log("debug", "Archiving stanza: %s", stanza:top_tag()); | 326 log("debug", "Archiving stanza: %s (%s)", stanza:top_tag(), why); |
| 327 | 327 |
| 328 -- And stash it | 328 -- And stash it |
| 329 local time = time_now(); | 329 local time = time_now(); |
| 330 local ok, err = archive:append(store_user, nil, clone_for_storage, time, with); | 330 local ok, err = archive:append(store_user, nil, clone_for_storage, time, with); |
| 331 if not ok and err == "quota-limit" then | 331 if not ok and err == "quota-limit" then |
