mod_carbons/mod_carbons.lua
changeset 1325 b21236b6b8d8
parent 1324 853a382c9bd6
child 1343 7dbde05b48a9
equal deleted inserted replaced
1324:853a382c9bd6 1325:b21236b6b8d8
    60 	if not user_sessions then
    60 	if not user_sessions then
    61 		module:log("debug", "Skip carbons for offline user");
    61 		module:log("debug", "Skip carbons for offline user");
    62 		return -- No use in sending carbons to an offline user
    62 		return -- No use in sending carbons to an offline user
    63 	end
    63 	end
    64 
    64 
    65 	local private_tag = stanza:child_with_name("private");
    65 	if stanza:get_child("private", xmlns_carbons) then
    66 	if private_tag and private.attr.xmlns == xmlns_carbons or private.attr.xmlns == xmlns_carbons_old then
       
    67 		if not c2s then
    66 		if not c2s then
    68 			stanza:maptags(function(tag)
    67 			stanza:maptags(function(tag)
    69 				if tag ~= private_tag then
    68 				if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then
    70 					return tag;
    69 					return tag;
    71 				end
    70 				end
    72 			end);
    71 			end);
    73 		end
    72 		end
    74 		module:log("debug", "Message tagged private, ignoring");
    73 		module:log("debug", "Message tagged private, ignoring");