Software /
code /
prosody
Changeset
2219:9e1c6b6a2ee4
util.dataforms: Don't require type when parsing form XML
author | Florian Zeitz |
---|---|
date | Wed, 25 Nov 2009 19:58:19 +0000 |
parents | 2169:c06fdb6b57bd |
children | 2220:98a880fda813 2222:81b4e738e4d3 |
files | util/dataforms.lua |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/dataforms.lua Wed Nov 25 15:40:33 2009 +0000 +++ b/util/dataforms.lua Wed Nov 25 19:58:19 2009 +0000 @@ -93,7 +93,13 @@ local data = {}; for field_tag in stanza:childtags() do - local field_type = field_tag.attr.type; + local field_type; + for n, field in ipairs(layout) do + if field.name == field_tag.attr.var then + field_type = field.type; + break; + end + end local reader = field_readers[field_type]; if reader then