# HG changeset patch # User Kim Alvefur # Date 1391379670 -3600 # Node ID 3df303543765795b7c827beeaf70f23d3fd3be41 # Parent b1a92a87309c3a61fd2be3c6663276e800162b53 mod_compat_vcard: Fix traceback from probably empty stanzas (Thanks Biszkopcik) diff -r b1a92a87309c -r 3df303543765 mod_compat_vcard/mod_compat_vcard.lua --- 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);