Mercurial > prosody-modules
diff mod_carbons/mod_carbons.lua @ 1324:853a382c9bd6
mod_turncredentials: Advertise the XEP-0215 feature (thanks Gryffus)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 28 Feb 2014 15:36:06 +0100 |
parents | 35c57db6877f |
children | b21236b6b8d8 |
line wrap: on
line diff
--- a/mod_carbons/mod_carbons.lua Wed Feb 26 13:08:47 2014 -0800 +++ b/mod_carbons/mod_carbons.lua Fri Feb 28 15:36:06 2014 +0100 @@ -62,10 +62,11 @@ return -- No use in sending carbons to an offline user end - if stanza:get_child("private", xmlns_carbons) then + local private_tag = stanza:child_with_name("private"); + if private_tag and private.attr.xmlns == xmlns_carbons or private.attr.xmlns == xmlns_carbons_old then if not c2s then stanza:maptags(function(tag) - if not ( tag.attr.xmlns == xmlns_carbons and tag.name == "private" ) then + if tag ~= private_tag then return tag; end end);