X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fvcard.lua;h=8aafa24d308e6b993c35fb6287795b3813228ba4;hb=95dfe4b0aaaf26ee4651c09eb9757c56210a135a;hp=29a408442a28a271a9e22bfb79937c840759f40e;hpb=3c64eae6e662e621b8ae9283ebd5ee21120a855a;p=prosody.git diff --git a/util/vcard.lua b/util/vcard.lua index 29a40844..8aafa24d 100644 --- a/util/vcard.lua +++ b/util/vcard.lua @@ -348,6 +348,12 @@ local function item_to_vcard4(item) local prop_def = vCard4_dtd[typ]; if prop_def == "text" then t:tag("text"):text(item[1]):up(); + elseif prop_def == "uri" then + if item.ENCODING and item.ENCODING[1] == 'b' then + t:tag("uri"):text("data:;base64,"):text(item[1]):up(); + else + t:tag("uri"):text(item[1]):up(); + end elseif type(prop_def) == "table" then if prop_def.values then for i, v in ipairs(prop_def.values) do