Mercurial > prosody-modules
comparison mod_mam/mod_mam.lua @ 2711:ff1f7e61517f
mod_mam: Adjust event handler priorities to match guidelines in docs
Avoids issues with mod_firewall dropped stanzas from being archived.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 28 Apr 2017 12:09:51 +0100 |
| parents | 2d5e0e2938d1 |
| children | 9f17d0f28d77 |
comparison
equal
deleted
inserted
replaced
| 2710:956b75b0e9d9 | 2711:ff1f7e61517f |
|---|---|
| 384 return math.random(cleanup_interval, cleanup_interval * 2); | 384 return math.random(cleanup_interval, cleanup_interval * 2); |
| 385 end); | 385 end); |
| 386 end | 386 end |
| 387 | 387 |
| 388 -- Stanzas sent by local clients | 388 -- Stanzas sent by local clients |
| 389 module:hook("pre-message/bare", c2s_message_handler, 2); | 389 module:hook("pre-message/bare", c2s_message_handler, 0); |
| 390 module:hook("pre-message/full", c2s_message_handler, 2); | 390 module:hook("pre-message/full", c2s_message_handler, 0); |
| 391 -- Stanszas to local clients | 391 -- Stanszas to local clients |
| 392 module:hook("message/bare", message_handler, 2); | 392 module:hook("message/bare", message_handler, 0); |
| 393 module:hook("message/full", message_handler, 2); | 393 module:hook("message/full", message_handler, 0); |
| 394 | 394 |
| 395 module:add_feature(xmlns_mam0); -- COMPAT with XEP-0313 v 0.1 | 395 module:add_feature(xmlns_mam0); -- COMPAT with XEP-0313 v 0.1 |
| 396 | 396 |
| 397 module:hook("account-disco-info", function(event) | 397 module:hook("account-disco-info", function(event) |
| 398 (event.reply or event.stanza):tag("feature", {var=xmlns_mam0}):up(); | 398 (event.reply or event.stanza):tag("feature", {var=xmlns_mam0}):up(); |
