Mercurial > prosody-hg
comparison plugins/mod_vcard.lua @ 2709:db3497124ca2
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 |
| parents | 5033348feba8 |
| children | b7049746bd29 |
comparison
equal
deleted
inserted
replaced
| 2298:508d9dc70bb4 | 2709:db3497124ca2 |
|---|---|
| 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 |
