Software /
code /
verse
Changeset
307:9d295d44a16e
util.vcard: Ignore undefined properties
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 01 Jul 2012 13:54:09 +0200 |
parents | 306:c6183b218f77 |
children | 308:2bcc97bc5f43 |
files | util/vcard.lua |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/util/vcard.lua Sun Jul 01 12:38:54 2012 +0200 +++ b/util/vcard.lua Sun Jul 01 13:54:09 2012 +0200 @@ -227,7 +227,6 @@ local function from_xep54_item(item) local prop_name = item.name; local prop_def = vCard_dtd[prop_name]; - if not prop_def then return nil end local prop = { name = prop_name }; @@ -299,7 +298,7 @@ local tags = vCard.tags; local t = {}; for i=1,#tags do - t[i] = from_xep54_item(tags[i]); + t_insert(t, from_xep54_item(tags[i])); end return t end @@ -312,9 +311,7 @@ local t = {}; local vCards = vCard.tags; for i=1,#vCards do - local ti = from_xep54_vCard(vCards[i]); - t[i] = ti; - --t[ti.name] = ti; + t[i] = from_xep54_vCard(vCards[i]); end return t elseif vCard.name == "vCard" then -- A single vCard