Software /
code /
prosody
Changeset
6400:95241c0f9244
util.vcard: Turn PHOTO fields into data-uris
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Sep 2014 16:47:55 +0200 |
parents | 6399:e26176bf1334 |
children | 6408:7e69d61a0ef7 |
files | util/vcard.lua |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/vcard.lua Fri Sep 05 19:09:13 2014 +0100 +++ b/util/vcard.lua Wed Sep 10 16:47:55 2014 +0200 @@ -349,7 +349,11 @@ if prop_def == "text" then t:tag("text"):text(item[1]):up(); elseif prop_def == "uri" then - t:tag("uri"):text(item[1]):up(); + 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