mod_muc_webchat_url: Fix default url
[prosody-modules.git] / mod_offline_hints / mod_offline_hints.lua
blobdcfd827c1247091810dab0a0532ea60fb974eecc
1 -- mod_offline_hints
2 --
3 -- Copyright (C) 2019 Marcos de Vera Piquero <marcos.devera@quobis.com>
4 --
5 -- This file is MIT/X11 licensed.
6 --
7 -- A module to discard hinted messages with no-store at mod_offline
8 --
10 module:depends"offline";
12 local function handle_offline (event)
13 local stanza = event.stanza;
14 if (stanza:get_child("no-store", "urn:xmpp:hints") or
15 stanza:get_child("no-permanent-store", "urn:xmpp:hints")) then
16 module:log("debug", "Not storing offline stanza: %s (urn:xmpp:hints)", stanza);
17 return false;
18 end
19 return nil;
20 end
22 module:hook("message/offline/handle", handle_offline);
24 module:log("debug", "Module loaded");