Software /
code /
prosody-modules
Comparison
mod_nooffline_noerror/mod_nooffline_noerror.lua @ 3928:7e7ac4af6e0c
mod_nooffline_noerror: New module that disables errors for disabled offline storage
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Mon, 02 Mar 2020 19:32:11 +0100 |
child | 3966:a411a8e028ed |
comparison
equal
deleted
inserted
replaced
3927:4c1f80076606 | 3928:7e7ac4af6e0c |
---|---|
1 -- Ignore disabled offline storage | |
2 -- | |
3 -- Copyright (C) 2019-2020 Thilo Molitor | |
4 -- | |
5 -- This project is MIT/X11 licensed. Please see the | |
6 -- COPYING file in the source package for more information. | |
7 -- | |
8 | |
9 -- depend on mod_mam to make sure mam is at least loaded and active | |
10 module:depends "mam"; | |
11 | |
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 | |
14 module:hook("message/offline/handle", function(event) | |
15 event.origin.log("info", "Ignoring offline message (mod_offline seems to be *not* loaded)..."); | |
16 return true; | |
17 end, -100); |