mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 14:17:37 +03:00
util.dataforms: Don't require type when parsing form XML
This commit is contained in:
parent
38e55888e5
commit
22d8917d8c
1 changed files with 7 additions and 1 deletions
|
@ -93,7 +93,13 @@ function form_t.data(layout, stanza)
|
||||||
local data = {};
|
local data = {};
|
||||||
|
|
||||||
for field_tag in stanza:childtags() do
|
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];
|
local reader = field_readers[field_type];
|
||||||
if reader then
|
if reader then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue