comparison mod_carbons/mod_carbons.lua @ 1316:d3e75f6dde9b

mod_carbons: Ignore MUC PMs if tagged as such
author Kim Alvefur <zash@zash.se>
date Sat, 22 Feb 2014 13:25:01 +0100
parents 0d3d15586d7e
children 35c57db6877f
comparison
equal deleted inserted replaced
1315:e8eebf281405 1316:d3e75f6dde9b
71 module:log("debug", "Message tagged private, ignoring"); 71 module:log("debug", "Message tagged private, ignoring");
72 return 72 return
73 elseif stanza:get_child("no-copy", "urn:xmpp:hints") then 73 elseif stanza:get_child("no-copy", "urn:xmpp:hints") then
74 module:log("debug", "Message has no-copy hint, ignoring"); 74 module:log("debug", "Message has no-copy hint, ignoring");
75 return 75 return
76 elseif stanza:get_child("x", "http://jabber.org/protocol/muc#user") then
77 module:log("debug", "MUC PM, ignoring");
78 return
76 end 79 end
77 80
78 -- Create the carbon copy and wrap it as per the Stanza Forwarding XEP 81 -- Create the carbon copy and wrap it as per the Stanza Forwarding XEP
79 local copy = st.clone(stanza); 82 local copy = st.clone(stanza);
80 copy.attr.xmlns = "jabber:client"; 83 copy.attr.xmlns = "jabber:client";