diff options
author | Florian Zeitz <devnull@localhost> | 2009-11-06 23:51:14 +0000 |
---|---|---|
committer | Florian Zeitz <devnull@localhost> | 2009-11-06 23:51:14 +0000 |
commit | f74347b14dce9a4f630ada94e59ef87eb23b5e1a (patch) | |
tree | 03344a94b033c4a5e5de4d0355f04a0abd287ced | |
parent | c129a0b2b9d2b87b49bacfc5dfafe9894ff3fdd4 (diff) | |
download | prosody-f74347b14dce9a4f630ada94e59ef87eb23b5e1a.tar.gz prosody-f74347b14dce9a4f630ada94e59ef87eb23b5e1a.zip |
util.dataforms: Support for jid-multi field type
-rw-r--r-- | util/dataforms.lua | 11 |
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 = {}; |