mod_throttle_unsolicited: Use existing local reference to origin
authorKim Alvefur <zash@zash.se>
Tue, 15 Nov 2016 09:01:03 +0100
changeset 2365 231d47e61c81
parent 2364 97e63e8f0f32
child 2366 c065ab67d807
mod_throttle_unsolicited: Use existing local reference to origin
mod_throttle_unsolicited/mod_throttle_unsolicited.lua
--- a/mod_throttle_unsolicited/mod_throttle_unsolicited.lua	Tue Nov 15 11:52:39 2016 +0000
+++ b/mod_throttle_unsolicited/mod_throttle_unsolicited.lua	Tue Nov 15 09:01:03 2016 +0100
@@ -42,8 +42,8 @@
 		log("debug", "%s is not subscribed to %s@%s", from_jid, to_user, to_host);
 		if not lim:poll(1) then
 			log("warn", "Sent too many messages to non-contacts, bouncing message");
-			event.origin.firewall_mark_throttle_unsolicited = gettime();
-			event.origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
+			origin.firewall_mark_throttle_unsolicited = gettime();
+			origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
 			return true;
 		end
 	end