Changeset

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
parents 9271:651e945ad971
children 9273:f2258e9750cf
files plugins/mod_vcard_legacy.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);