Changeset

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 1866:58d96960ba8b
children 1868:d6e673f98572
files mod_throttle_presence/mod_throttle_presence.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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;