diff options
author | Kim Alvefur <zash@zash.se> | 2020-06-25 18:01:38 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-06-25 18:01:38 +0200 |
commit | 20de5f297e486febdf389c578a9d44189c3b8ca4 (patch) | |
tree | 3d7c3f7844c7d0db7b00f03acffa5265ab0d3227 /plugins | |
parent | 1c81e40b20e1aa1e81352a8268f42e245a829717 (diff) | |
download | prosody-20de5f297e486febdf389c578a9d44189c3b8ca4.tar.gz prosody-20de5f297e486febdf389c578a9d44189c3b8ca4.zip |
mod_mam: "Handle" messages that have been archived in the absense of mod_offline
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_mam/mod_mam.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index 1b5c926c..92d45411 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -474,6 +474,13 @@ end module:hook("pre-message/bare", strip_stanza_id_after_other_events, -1); module:hook("pre-message/full", strip_stanza_id_after_other_events, -1); +module:hook("message/offline/handle", function(event) + local stanza = event.stanza; + if stanza:get_child("stanza-id", xmlns_st_id) then + return true; + end +end, -2); + if cleanup_after ~= "never" then local cleanup_storage = module:open_store("archive_cleanup"); local cleanup_map = module:open_store("archive_cleanup", "map"); |