aboutsummaryrefslogtreecommitdiffstats
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
commit410e92422f59ec321dbbf4d377479fd18e7c9e68 (patch)
treeb4c043b643a681031a7d76906c44e66b463e507e
parente59116c19a93c3ad0e00fb1c6d53ce5a2161d9ca (diff)
downloadprosody-410e92422f59ec321dbbf4d377479fd18e7c9e68.tar.gz
prosody-410e92422f59ec321dbbf4d377479fd18e7c9e68.zip
util.vcard: Include values of 'properties' (eg PHOTO TYPE) in vcard-temp serialization
-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