comparison mod_carbons/mod_carbons.lua @ 1167:8ceab2331216

mod_carbons: Fix <private/> handling
author Kim Alvefur <zash@zash.se>
date Wed, 21 Aug 2013 19:03:16 +0200
parents 28d4b58bcc3b
children 3acb01ca7e5c
comparison
equal deleted inserted replaced
1166:2b62a3b76d76 1167:8ceab2331216
77 return -- No use in sending carbons to an offline user 77 return -- No use in sending carbons to an offline user
78 end 78 end
79 79
80 if not c2s and stanza:get_child("private", xmlns_carbons) then 80 if not c2s and stanza:get_child("private", xmlns_carbons) then
81 stanza:maptags(function(tag) 81 stanza:maptags(function(tag)
82 return tag.attr.xmlns == xmlns_carbons 82 if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then
83 and tag.name == "private" and tag or nil; 83 return tag;
84 end
84 end); 85 end);
85 module:log("debug", "Message tagged private, ignoring"); 86 module:log("debug", "Message tagged private, ignoring");
86 return 87 return
87 elseif stanza:get_child("no-copy", "urn:xmpp:hints") then 88 elseif stanza:get_child("no-copy", "urn:xmpp:hints") then
88 module:log("debug", "Message has no-copy hint, ignoring"); 89 module:log("debug", "Message has no-copy hint, ignoring");