Diff

plugins/mod_version.lua @ 9434:b502766a10d7

mod_version: Make 'origin' variable local for consistency Many event handlers start with local origin, stanza = event.origin, event.stanza;
author Kim Alvefur <zash@zash.se>
date Sat, 06 Oct 2018 16:29:42 +0200
parent 9433:13b8d47119ad
child 9435:33301038d3e4
line wrap: on
line diff
--- a/plugins/mod_version.lua	Sat Oct 06 16:27:31 2018 +0200
+++ b/plugins/mod_version.lua	Sat Oct 06 16:29:42 2018 +0200
@@ -40,7 +40,7 @@
 end
 
 module:hook("iq-get/host/jabber:iq:version:query", function(event)
-	local stanza = event.stanza;
-	event.origin.send(st.reply(stanza):add_child(query));
+	local origin, stanza = event.origin, event.stanza;
+	origin.send(st.reply(stanza):add_child(query));
 	return true;
 end);