Mercurial > prosody-modules
comparison mod_mam/mod_mam.lua @ 2914:0d2d4d5bb5f5
[mod_mam] Fix hook priority for local clients, too (see also commit 2af42a3af131)
| author | tmolitor <thilo@eightysoft.de> |
|---|---|
| date | Wed, 07 Mar 2018 22:21:43 +0100 |
| parents | 2af42a3af131 |
| children | e45a3d04367b |
comparison
equal
deleted
inserted
replaced
| 2913:3fb4f72b3dfd | 2914:0d2d4d5bb5f5 |
|---|---|
| 404 -- it'll get slow. | 404 -- it'll get slow. |
| 405 use_total = false; | 405 use_total = false; |
| 406 end | 406 end |
| 407 | 407 |
| 408 -- Stanzas sent by local clients | 408 -- Stanzas sent by local clients |
| 409 module:hook("pre-message/bare", c2s_message_handler, 0); | 409 local priority = 0.075 |
| 410 module:hook("pre-message/full", c2s_message_handler, 0); | 410 assert(priority < 0.1, "priority must be after mod_firewall"); |
| 411 assert(priority > 0.05, "priority must be before mod_carbons"); | |
| 412 assert(priority > 0.01, "priority must be before strip_stanza_id"); | |
| 413 module:hook("pre-message/bare", c2s_message_handler, priority); | |
| 414 module:hook("pre-message/full", c2s_message_handler, priority); | |
| 411 -- Stanszas to local clients | 415 -- Stanszas to local clients |
| 412 local priority = 0.075 | 416 priority = 0.075 |
| 413 assert(priority > 0, "priority must be before mod_message"); | 417 assert(priority > 0, "priority must be before mod_message"); |
| 414 assert(priority < 0.1, "priority must be after mod_firewall"); | 418 assert(priority < 0.1, "priority must be after mod_firewall"); |
| 415 assert(priority > 0.05, "priority must be before mod_carbons"); | 419 assert(priority > 0.05, "priority must be before mod_carbons"); |
| 416 module:hook("message/bare", message_handler, priority); | 420 module:hook("message/bare", message_handler, priority); |
| 417 module:hook("message/full", message_handler, priority); | 421 module:hook("message/full", message_handler, priority); |
