aboutsummaryrefslogtreecommitdiffstats
path: root/util/dataforms.lua
diff options
context:
space:
mode:
authorFlorian Zeitz <devnull@localhost>2009-11-06 23:51:14 +0000
committerFlorian Zeitz <devnull@localhost>2009-11-06 23:51:14 +0000
commitf74347b14dce9a4f630ada94e59ef87eb23b5e1a (patch)
tree03344a94b033c4a5e5de4d0355f04a0abd287ced /util/dataforms.lua
parentc129a0b2b9d2b87b49bacfc5dfafe9894ff3fdd4 (diff)
downloadprosody-f74347b14dce9a4f630ada94e59ef87eb23b5e1a.tar.gz
prosody-f74347b14dce9a4f630ada94e59ef87eb23b5e1a.zip
util.dataforms: Support for jid-multi field type
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r--util/dataforms.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index f71ceb46..5626172e 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -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 = {};