diff mod_carbons/mod_carbons.lua @ 1167:8ceab2331216

mod_carbons: Fix <private/> handling
author Kim Alvefur <zash@zash.se>
date Wed, 21 Aug 2013 19:03:16 +0200
parents 28d4b58bcc3b
children 3acb01ca7e5c
line wrap: on
line diff
--- a/mod_carbons/mod_carbons.lua	Fri Aug 16 00:25:37 2013 +0200
+++ b/mod_carbons/mod_carbons.lua	Wed Aug 21 19:03:16 2013 +0200
@@ -79,8 +79,9 @@
 
 	if not c2s and stanza:get_child("private", xmlns_carbons) then
 		stanza:maptags(function(tag)
-			return tag.attr.xmlns == xmlns_carbons
-				and tag.name == "private" and tag or nil;
+			if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then
+				return tag;
+			end
 		end);
 		module:log("debug", "Message tagged private, ignoring");
 		return