mod_vcard: Stricter matching of vcard stanzas with vcard_compatibility enabled, fixes intercepting stanzas to the full JID that it shouldn't

Wed, 09 Dec 2009 13:19:50 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 09 Dec 2009 13:19:50 +0000
changeset 2709
db3497124ca2
parent 2298
508d9dc70bb4
child 2710
1600aff0839f

mod_vcard: Stricter matching of vcard stanzas with vcard_compatibility enabled, fixes intercepting stanzas to the full JID that it shouldn't

plugins/mod_vcard.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_vcard.lua	Wed Dec 02 22:13:31 2009 +0000
+++ b/plugins/mod_vcard.lua	Wed Dec 09 13:19:50 2009 +0000
@@ -51,7 +51,7 @@
 	module:hook("iq/full", function(data)
 		local stanza = data.stanza;
 		local payload = stanza.tags[1];
-		if stanza.attr.type == "get" or stanza.attr.type == "set" and payload.name == "vCard" and payload.attr.xmlns == "vcard-temp" then
+		if stanza.attr.type == "get" and payload.name == "vCard" and payload.attr.xmlns == "vcard-temp" then
 			return handle_vcard(data);
 		end
 	end, 1);

mercurial