Software /
code /
prosody-modules
Changeset
1317:35c57db6877f
mod_carbons: Ignore messages tagged as private in both directions (thanks hoedlmoser)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Feb 2014 13:26:22 +0100 |
parents | 1316:d3e75f6dde9b |
children | 1318:5d49dc72b732 |
files | mod_carbons/mod_carbons.lua |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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