changeset 1739:940a4ab75cec

mod_storage_xmlarchive: This module only supports storage of stanzas, log a warning about attempts to do otherwise
author Kim Alvefur <zash@zash.se>
date Mon, 18 May 2015 02:43:34 +0200
parents b3f048af2dfe
children 11f7fb2f927f
files mod_storage_xmlarchive/mod_storage_xmlarchive.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Mon May 18 02:33:43 2015 +0200
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Mon May 18 02:43:34 2015 +0200
@@ -24,6 +24,7 @@
 
 function archive:append(username, _, when, with, data)
 	if getmetatable(data) ~= st.stanza_mt then
+		module:log("error", "Attempt to store non-stanza object, traceback: %s", debug.traceback());
 		return nil, "unsupported-datatype";
 	end
 	username = username or "@";