Mercurial > prosody-modules
changeset 2768:2af42a3af131
mod_mam: Squeeze in hooks with priority between sevral other modules (fixes #996)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 21 Sep 2017 23:31:42 +0200 |
parents | e1edf643fbb1 |
children | fdb2f53347d6 |
files | mod_mam/mod_mam.lua |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua Tue Sep 19 22:07:51 2017 +0200 +++ b/mod_mam/mod_mam.lua Thu Sep 21 23:31:42 2017 +0200 @@ -409,8 +409,12 @@ module:hook("pre-message/bare", c2s_message_handler, 0); module:hook("pre-message/full", c2s_message_handler, 0); -- Stanszas to local clients -module:hook("message/bare", message_handler, 0); -module:hook("message/full", message_handler, 0); +local priority = 0.075 +assert(priority > 0, "priority must be before mod_message"); +assert(priority < 0.1, "priority must be after mod_firewall"); +assert(priority > 0.05, "priority must be before mod_carbons"); +module:hook("message/bare", message_handler, priority); +module:hook("message/full", message_handler, priority); module:add_feature(xmlns_mam0); -- COMPAT with XEP-0313 v 0.1