changeset 1767:ca48eea4785c

mod_filter_chatstates: Backout 02cd4a081db4; no longer required due to changes in mod_smacks
author Kim Alvefur <zash@zash.se>
date Mon, 08 Jun 2015 15:29:33 +0200
parents e4c3d335b07f
children 163967467308
files mod_filter_chatstates/mod_filter_chatstates.lua
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mod_filter_chatstates/mod_filter_chatstates.lua	Mon Jun 08 15:27:28 2015 +0200
+++ b/mod_filter_chatstates/mod_filter_chatstates.lua	Mon Jun 08 15:29:33 2015 +0200
@@ -1,9 +1,6 @@
 local filters = require "util.filters";
 local st = require "util.stanza";
 
-local dummy_stanza_mt = setmetatable({ __tostring = function () return ""; end }, { __index = st.stanza_mt });
-local dummy_stanza = setmetatable(st.stanza(), dummy_stanza_mt);
-
 module:depends("csi");
 
 local function filter_chatstates(stanza)
@@ -11,11 +8,11 @@
 		stanza = st.clone(stanza);
 		stanza:maptags(function (tag)
 			if tag.attr.xmlns ~= "http://jabber.org/protocol/chatstates" then
-				return tag;
+				return tag
 			end
 		end);
 		if #stanza.tags == 0 then
-			return dummy_stanza;
+			return nil;
 		end
 	end
 	return stanza;