Software /
code /
prosody
Comparison
plugins/mod_vcard.lua @ 2344:1e27e0092f19
mod_vcard: Stricter matching of vcard stanzas with vcard_compatibility enabled, fixes intercepting stanzas to the full JID that it shouldn't
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 09 Dec 2009 13:19:50 +0000 |
parent | 2004:5033348feba8 |
child | 2923:b7049746bd29 |
comparison
equal
deleted
inserted
replaced
2343:4b05fd561cbd | 2344:1e27e0092f19 |
---|---|
49 -- COMPAT: https://support.process-one.net/browse/EJAB-1045 | 49 -- COMPAT: https://support.process-one.net/browse/EJAB-1045 |
50 if module:get_option("vcard_compatibility") then | 50 if module:get_option("vcard_compatibility") then |
51 module:hook("iq/full", function(data) | 51 module:hook("iq/full", function(data) |
52 local stanza = data.stanza; | 52 local stanza = data.stanza; |
53 local payload = stanza.tags[1]; | 53 local payload = stanza.tags[1]; |
54 if stanza.attr.type == "get" or stanza.attr.type == "set" and payload.name == "vCard" and payload.attr.xmlns == "vcard-temp" then | 54 if stanza.attr.type == "get" and payload.name == "vCard" and payload.attr.xmlns == "vcard-temp" then |
55 return handle_vcard(data); | 55 return handle_vcard(data); |
56 end | 56 end |
57 end, 1); | 57 end, 1); |
58 end | 58 end |