diff mod_carbons/mod_carbons.lua @ 1325:b21236b6b8d8

Backed out changeset 853a382c9bd6
author Kim Alvefur <zash@zash.se>
date Fri, 28 Feb 2014 15:37:55 +0100
parents 853a382c9bd6
children 7dbde05b48a9
line wrap: on
line diff
--- a/mod_carbons/mod_carbons.lua	Fri Feb 28 15:36:06 2014 +0100
+++ b/mod_carbons/mod_carbons.lua	Fri Feb 28 15:37:55 2014 +0100
@@ -62,11 +62,10 @@
 		return -- No use in sending carbons to an offline user
 	end
 
-	local private_tag = stanza:child_with_name("private");
-	if private_tag and private.attr.xmlns == xmlns_carbons or private.attr.xmlns == xmlns_carbons_old then
+	if stanza:get_child("private", xmlns_carbons) then
 		if not c2s then
 			stanza:maptags(function(tag)
-				if tag ~= private_tag then
+				if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then
 					return tag;
 				end
 			end);