Software /
code /
prosody
Comparison
plugins/mod_vcard_legacy.lua @ 9272:c047be86dd51
mod_vcard_legacy: Return old vcard if neither vcard4 or avatar available
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 07 Sep 2018 01:06:27 +0200 |
parent | 9271:651e945ad971 |
child | 9273:f2258e9750cf |
comparison
equal
deleted
inserted
replaced
9271:651e945ad971 | 9272:c047be86dd51 |
---|---|
125 elseif info and info.attr.url then | 125 elseif info and info.attr.url then |
126 vcard_temp:text_tag("EXTVAL", info.attr.uri); | 126 vcard_temp:text_tag("EXTVAL", info.attr.uri); |
127 end | 127 end |
128 vcard_temp:up(); | 128 vcard_temp:up(); |
129 end | 129 end |
130 end | |
131 | |
132 if not vcard_temp.tags[1] then | |
133 vcard_temp = st.deserialize(vcards:get(jid_split(stanza.attr.to) or origin.username)) or vcard_temp; | |
130 end | 134 end |
131 | 135 |
132 origin.send(st.reply(stanza):add_child(vcard_temp)); | 136 origin.send(st.reply(stanza):add_child(vcard_temp)); |
133 return true; | 137 return true; |
134 end); | 138 end); |