diff mod_auto_accept_subscriptions/mod_auto_accept_subscriptions.lua @ 1694:25412e94fb3e

mod_auto_accept_subscriptions: Fix passing nil in log message
author Matthew Wild <mwild1@gmail.com>
date Tue, 05 May 2015 13:58:37 +0100
parents 7dbde05b48a9
children 6d2ec330fbcf
line wrap: on
line diff
--- a/mod_auto_accept_subscriptions/mod_auto_accept_subscriptions.lua	Tue May 05 12:09:08 2015 +0200
+++ b/mod_auto_accept_subscriptions/mod_auto_accept_subscriptions.lua	Tue May 05 13:58:37 2015 +0100
@@ -7,7 +7,7 @@
 	local to_bare, from_bare = jid.bare(stanza.attr.to), jid.bare(stanza.attr.from);
 	local node, host = jid.split(to_bare);
 	stanza.attr.from, stanza.attr.to = from_bare, to_bare;
-	module:log("info", "Auto-accepting inbound subscription request from %s to %s", from_bare, to_bare);
+	module:log("info", "Auto-accepting inbound subscription request from %s to %s", tostring(from_bare), tostring(to_bare));
 
 	if not rostermanager.is_contact_subscribed(node, host, from_bare) then
 		core_post_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="unavailable"}), true); -- acknowledging receipt
@@ -35,7 +35,7 @@
 			end
 		end
 	end
-	module:log("warn", "Failed to auto-accept subscription request from %s to %s", from_bare, to_bare);
+	module:log("warn", "Failed to auto-accept subscription request from %s to %s", tostring(from_bare), tostring(to_bare));
 end
 
 module:hook("presence/bare", function (event)