aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_offline.lua
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
commit082761bde34c1a1cca02d574c13d4f8f78637db6 (patch)
treefd9d8d77fc75d7afa98bdae5be8fbe274ae5c550 /plugins/mod_offline.lua
parenta4f4107e5a258eb083d63acdb75f3f39bb39d34c (diff)
downloadprosody-082761bde34c1a1cca02d574c13d4f8f78637db6.tar.gz
prosody-082761bde34c1a1cca02d574c13d4f8f78637db6.zip
mod_offline: Log a debug message when message is stored
Diffstat (limited to 'plugins/mod_offline.lua')
-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)