diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-07 01:06:27 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-07 01:06:27 +0200 |
commit | 72c5550c5d6017d2d0ce2976aa25db79886229d2 (patch) | |
tree | 1c7b158258b0c40e356c6f6f4eb2763b60c78e66 | |
parent | 4ecf288a935ba26546967f27168448bc4cc2d4d4 (diff) | |
download | prosody-72c5550c5d6017d2d0ce2976aa25db79886229d2.tar.gz prosody-72c5550c5d6017d2d0ce2976aa25db79886229d2.zip |
mod_vcard_legacy: Return old vcard if neither vcard4 or avatar available
-rw-r--r-- | plugins/mod_vcard_legacy.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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); |