aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-29 23:50:34 +0200
committerKim Alvefur <zash@zash.se>2019-09-29 23:50:34 +0200
commit7850aa7c109befaeeeaeafe200fe237bb0d57a54 (patch)
treefd9d8d77fc75d7afa98bdae5be8fbe274ae5c550 /plugins
parentcbbcbf6fda93217a647d58ecd6b8b08968338e59 (diff)
downloadprosody-7850aa7c109befaeeeaeafe200fe237bb0d57a54.tar.gz
prosody-7850aa7c109befaeeeaeafe200fe237bb0d57a54.zip
mod_offline: Log a debug message when message is stored
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_offline.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_offline.lua b/plugins/mod_offline.lua
index 04c679cf..dffe8357 100644
--- a/plugins/mod_offline.lua
+++ b/plugins/mod_offline.lua
@@ -24,7 +24,11 @@ module:hook("message/offline/handle", function(event)
node = origin.username;
end
- return offline_messages:append(node, nil, stanza, os.time(), "");
+ local ok = offline_messages:append(node, nil, stanza, os.time(), "");
+ if ok then
+ module:log("debug", "Saved to offline storage: %s", stanza:top_tag());
+ end
+ return ok;
end, -1);
module:hook("message/offline/broadcast", function(event)