Software /
code /
prosody-modules
Comparison
mod_nooffline_noerror/mod_nooffline_noerror.lua @ 3966:a411a8e028ed
mod_nooffline_noerror: fix error in logging
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Sat, 21 Mar 2020 23:50:34 +0100 |
parent | 3928:7e7ac4af6e0c |
child | 3970:e0f3e29ab18a |
comparison
equal
deleted
inserted
replaced
3952:343dc9dd70dd | 3966:a411a8e028ed |
---|---|
10 module:depends "mam"; | 10 module:depends "mam"; |
11 | 11 |
12 -- ignore offline messages and don't return any error (the message will be already in MAM at this point) | 12 -- ignore offline messages and don't return any error (the message will be already in MAM at this point) |
13 -- this is *only* triggered if mod_offline is *not* loaded and completely ignored otherwise | 13 -- this is *only* triggered if mod_offline is *not* loaded and completely ignored otherwise |
14 module:hook("message/offline/handle", function(event) | 14 module:hook("message/offline/handle", function(event) |
15 event.origin.log("info", "Ignoring offline message (mod_offline seems to be *not* loaded)..."); | 15 local log = event.origin and event.origin.log or module._log |
16 log("info", "Ignoring offline message (mod_offline seems to be *not* loaded)..."); | |
16 return true; | 17 return true; |
17 end, -100); | 18 end, -100); |