# HG changeset patch # User Kim Alvefur # Date 1393071982 -3600 # Node ID 35c57db6877f27fb11d9d40a9b49c6fa69295001 # Parent d3e75f6dde9b5f4a32d7e4bb18abd468b841994b mod_carbons: Ignore messages tagged as private in both directions (thanks hoedlmoser) diff -r d3e75f6dde9b -r 35c57db6877f mod_carbons/mod_carbons.lua --- a/mod_carbons/mod_carbons.lua Sat Feb 22 13:25:01 2014 +0100 +++ b/mod_carbons/mod_carbons.lua Sat Feb 22 13:26:22 2014 +0100 @@ -62,12 +62,14 @@ return -- No use in sending carbons to an offline user end - if not c2s and stanza:get_child("private", xmlns_carbons) then - stanza:maptags(function(tag) - if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then - return tag; - end - end); + if stanza:get_child("private", xmlns_carbons) then + if not c2s then + stanza:maptags(function(tag) + if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then + return tag; + end + end); + end module:log("debug", "Message tagged private, ignoring"); return elseif stanza:get_child("no-copy", "urn:xmpp:hints") then