aboutsummaryrefslogtreecommitdiffstats
path: root/util/dataforms.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-11-29 21:33:37 +0100
committerTobias Markmann <tm@ayena.de>2009-11-29 21:33:37 +0100
commitf91009f78a46ad74aa62ff487fa297c06a1ae6a3 (patch)
tree8ef6302fc66fdc48b4f34f58c3bea877d7ee6bee /util/dataforms.lua
parent8db68f17623ad29b25c6b5d757a2fb0b3d3005c6 (diff)
parent8fcbba4b0fccb299121083d97cab065e51fba9d1 (diff)
downloadprosody-f91009f78a46ad74aa62ff487fa297c06a1ae6a3.tar.gz
prosody-f91009f78a46ad74aa62ff487fa297c06a1ae6a3.zip
Merge with tip.
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r--util/dataforms.lua8
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