diff mod_throttle_presence/mod_throttle_presence.lua @ 1488:ba97f9be4f76

mod_throttle_presence: Fix traceback (thanks Ge0rG)
author Kim Alvefur <zash@zash.se>
date Sun, 17 Aug 2014 20:21:09 +0200
parents d8c50448d0e7
children 95f10fb7f60e
line wrap: on
line diff
--- a/mod_throttle_presence/mod_throttle_presence.lua	Sat Aug 16 17:55:08 2014 +0100
+++ b/mod_throttle_presence/mod_throttle_presence.lua	Sun Aug 17 20:21:09 2014 +0200
@@ -22,7 +22,7 @@
 end
 
 local function throttle_session(event)
-	local session = event.session;
+	local session = event.origin;
 	if session.presence_buffer then return; end
 	module:log("debug", "Suppressing presence updates to %s", session.full_jid);
 	session.presence_buffer = {};
@@ -30,7 +30,7 @@
 end
 
 local function restore_session(event)
-	local session = event.session;
+	local session = event.origin;
 	if not session.presence_buffer then return; end
 	filters.remove_filter(session, "stanzas/out", presence_filter);
 	module:log("debug", "Flushing buffer for %s", session.full_jid);