diff mod_throttle_presence/mod_throttle_presence.lua @ 1867:34468d3bfcac

mod_throttle_presence: Skip past things that are not stanza objects
author Kim Alvefur <zash@zash.se>
date Mon, 21 Sep 2015 23:45:45 +0200
parents b8164f18142a
children 552faee596b7
line wrap: on
line diff
--- a/mod_throttle_presence/mod_throttle_presence.lua	Mon Sep 21 23:44:55 2015 +0200
+++ b/mod_throttle_presence/mod_throttle_presence.lua	Mon Sep 21 23:45:45 2015 +0200
@@ -4,6 +4,9 @@
 module:depends("csi");
 
 local function presence_filter(stanza, session)
+	if getmetatable(stanza) ~= st.stanza_mt then
+		return stanza; -- Things we don't want to touch
+	end
 	if stanza._flush then
 		stanza._flush = nil;
 		return stanza;