Changeset

10296:7072569044d4

mod_offline: Log a debug message when message is stored
author Kim Alvefur <zash@zash.se>
date Sun, 29 Sep 2019 23:50:34 +0200
parents 10295:9b662488d726
children 10297:da9f21a70e52
files plugins/mod_offline.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_offline.lua	Sun Sep 29 21:12:46 2019 +0200
+++ b/plugins/mod_offline.lua	Sun Sep 29 23:50:34 2019 +0200
@@ -24,7 +24,11 @@
 		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)