Software /
code /
prosody-modules
Changeset
806:d15a9eaa63ea
mod_vjud/vcard.lib: Handle empty vcards (thanks mva)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 27 Aug 2012 00:06:06 +0200 |
parents | 805:7e474c7f450a |
children | 807:7d1d3ca31d03 |
files | mod_vjud/vcard.lib.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_vjud/vcard.lib.lua Sun Aug 26 17:20:45 2012 +0000 +++ b/mod_vjud/vcard.lib.lua Mon Aug 27 00:06:06 2012 +0200 @@ -98,7 +98,7 @@ end function to_xep54(vCards) - if vCards[1].name then + if not vCards[1] or vCards[1].name then return vcard_to_xep54(vCards) else local t = st.stanza("xCard", { xmlns = "vcard-temp" }); @@ -213,7 +213,7 @@ end function to_text(vCards) - if vCards[1].name then + if vCards[1] and vCards[1].name then return vcard_to_text(vCards) else local t = {};