aboutsummaryrefslogtreecommitdiffstats
path: root/util/vcard.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-07-25 23:54:48 +0200
committerKim Alvefur <zash@zash.se>2018-07-25 23:54:48 +0200
commitc018f930060c2baa7ef5c17a65e73b6562cbfa17 (patch)
treeb4c043b643a681031a7d76906c44e66b463e507e /util/vcard.lua
parent28e1adcebb3d4b8b70df510cee8895e12951b20c (diff)
downloadprosody-c018f930060c2baa7ef5c17a65e73b6562cbfa17.tar.gz
prosody-c018f930060c2baa7ef5c17a65e73b6562cbfa17.zip
util.vcard: Include values of 'properties' (eg PHOTO TYPE) in vcard-temp serialization
Diffstat (limited to 'util/vcard.lua')
-rw-r--r--util/vcard.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/util/vcard.lua b/util/vcard.lua
index 51758c41..8cbc7165 100644
--- a/util/vcard.lua
+++ b/util/vcard.lua
@@ -61,9 +61,11 @@ local function item_to_xep54(item)
end
if prop_def.props then
- for _,v in pairs(prop_def.props) do
- if item[v] then
- t:tag(v):up();
+ for _,prop in pairs(prop_def.props) do
+ if item[prop] then
+ for _, v in ipairs(item[prop]) do
+ t:text_tag(prop, v);
+ end
end
end
end