mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
util.dataforms: Support for jid-multi field type
This commit is contained in:
parent
c129a0b2b9
commit
f74347b14d
1 changed files with 11 additions and 0 deletions
|
@ -118,6 +118,17 @@ field_readers["text-private"] =
|
|||
field_readers["jid-single"] =
|
||||
field_readers["text-single"];
|
||||
|
||||
field_readers["jid-multi"] =
|
||||
function (field_tag)
|
||||
local result = {};
|
||||
for value_tag in field_tag:childtags() do
|
||||
if value_tag.name == "value" then
|
||||
result[#result+1] = value_tag[1];
|
||||
end
|
||||
end
|
||||
return result;
|
||||
end
|
||||
|
||||
field_readers["text-multi"] =
|
||||
function (field_tag)
|
||||
local result = {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue