Mercurial > prosody-modules
changeset 1297:3df303543765
mod_compat_vcard: Fix traceback from probably empty stanzas (Thanks Biszkopcik)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 02 Feb 2014 23:21:10 +0100 |
parents | b1a92a87309c |
children | 659da45a2b4b |
files | mod_compat_vcard/mod_compat_vcard.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_compat_vcard/mod_compat_vcard.lua Sun Feb 02 18:12:42 2014 +0100 +++ b/mod_compat_vcard/mod_compat_vcard.lua Sun Feb 02 23:21:10 2014 +0100 @@ -10,7 +10,7 @@ module:hook("iq/full", function(event) local stanza = event.stanza; local payload = stanza.tags[1]; - if payload.name == "vCard" and stanza.attr.type == "get" and payload.attr.xmlns == "vcard-temp" then + if payload and stanza.attr.type == "get" and payload.name == "vCard" and payload.attr.xmlns == "vcard-temp" then local fixed_stanza = st.clone(event.stanza); fixed_stanza.attr.to = jid_bare(stanza.attr.to); core_process_stanza(event.origin, fixed_stanza);