plugins/mod_carbons.lua
changeset 10790 a1b633ba9bd9
parent 10789 e210afc9296a
child 10806 c11f9cd6c761
equal deleted inserted replaced
10789:e210afc9296a 10790:a1b633ba9bd9
    90 
    90 
    91 	local should, why = should_copy(stanza, c2s, bare_jid);
    91 	local should, why = should_copy(stanza, c2s, bare_jid);
    92 
    92 
    93 	if not should then
    93 	if not should then
    94 		module:log("debug", "Not copying stanza: %s (%s)", stanza:top_tag(), why);
    94 		module:log("debug", "Not copying stanza: %s (%s)", stanza:top_tag(), why);
    95 		return;
    95 		if why == "private" and not c2s then
    96 	elseif why == "private" and not c2s then
       
    97 			stanza:maptags(function(tag)
    96 			stanza:maptags(function(tag)
    98 				if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then
    97 				if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then
    99 					return tag;
    98 					return tag;
   100 				end
    99 				end
   101 			end);
   100 			end);
       
   101 		end
       
   102 		return;
   102 	end
   103 	end
   103 
   104 
   104 	local carbon;
   105 	local carbon;
   105 	user_sessions = user_sessions and user_sessions.sessions;
   106 	user_sessions = user_sessions and user_sessions.sessions;
   106 	for _, session in pairs(user_sessions) do
   107 	for _, session in pairs(user_sessions) do