# HG changeset patch # User Kim Alvefur # Date 1569793834 -7200 # Node ID 7072569044d4421dbc0f18d75a792fdf23d8ee06 # Parent 9b662488d7266849bf845e8809f47114317974b8 mod_offline: Log a debug message when message is stored diff -r 9b662488d726 -r 7072569044d4 plugins/mod_offline.lua --- 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)