# HG changeset patch # User Kim Alvefur # Date 1536275187 -7200 # Node ID c047be86dd5105436d9f4d2e52cb5efd3574fa4c # Parent 651e945ad971982749f9f068bb220c8be57f71d1 mod_vcard_legacy: Return old vcard if neither vcard4 or avatar available diff -r 651e945ad971 -r c047be86dd51 plugins/mod_vcard_legacy.lua --- a/plugins/mod_vcard_legacy.lua Fri Sep 07 01:04:53 2018 +0200 +++ b/plugins/mod_vcard_legacy.lua Fri Sep 07 01:06:27 2018 +0200 @@ -129,6 +129,10 @@ end end + if not vcard_temp.tags[1] then + vcard_temp = st.deserialize(vcards:get(jid_split(stanza.attr.to) or origin.username)) or vcard_temp; + end + origin.send(st.reply(stanza):add_child(vcard_temp)); return true; end);