From 7032c73db013dd8f9906e21f0ab917058685e738 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 7 Sep 2018 01:06:27 +0200 Subject: mod_vcard_legacy: Return old vcard if neither vcard4 or avatar available --- plugins/mod_vcard_legacy.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/mod_vcard_legacy.lua b/plugins/mod_vcard_legacy.lua index d6383114..40d81e66 100644 --- a/plugins/mod_vcard_legacy.lua +++ b/plugins/mod_vcard_legacy.lua @@ -129,6 +129,10 @@ module:hook("iq-get/bare/vcard-temp:vCard", function (event) 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); -- cgit v1.2.3