--- 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