diff options
author | Florian Zeitz <devnull@localhost> | 2009-11-25 19:58:19 +0000 |
---|---|---|
committer | Florian Zeitz <devnull@localhost> | 2009-11-25 19:58:19 +0000 |
commit | 22d8917d8ced0783831e0050e1f0ca4089e273e8 (patch) | |
tree | 69acfc9940e9ef027f57791baf56c1b6e015a858 /util/dataforms.lua | |
parent | 38e55888e5c0a041f876281cfeb6230be406c7c3 (diff) | |
download | prosody-22d8917d8ced0783831e0050e1f0ca4089e273e8.tar.gz prosody-22d8917d8ced0783831e0050e1f0ca4089e273e8.zip |
util.dataforms: Don't require type when parsing form XML
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r-- | util/dataforms.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua index 5626172e..a3bde8ca 100644 --- a/util/dataforms.lua +++ b/util/dataforms.lua @@ -93,7 +93,13 @@ function form_t.data(layout, stanza) 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 |