diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-01 18:10:33 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-01 18:10:33 +0200 |
commit | d4ebb070dfe68782852f6d32f6cc00e558a62785 (patch) | |
tree | 0adbfc090994609ce4e9488835b7caa5953eb94b /plugins | |
parent | 00048e67f24e800308f3dc3a83b6d97dda36bf7f (diff) | |
download | prosody-d4ebb070dfe68782852f6d32f6cc00e558a62785.tar.gz prosody-d4ebb070dfe68782852f6d32f6cc00e558a62785.zip |
mod_vcard_legacy: Clear avatars on setting a vcard-temp
Otherwise it is not possible to remove avatars
Diffstat (limited to 'plugins')
-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 5c2625e4..51d84dc3 100644 --- a/plugins/mod_vcard_legacy.lua +++ b/plugins/mod_vcard_legacy.lua @@ -134,6 +134,10 @@ module:hook("iq-set/self/vcard-temp:vCard", function (event) local vcard4 = st.stanza("item", { xmlns = "http://jabber.org/protocol/pubsub", id = "current" }) :tag("vcard", { xmlns = 'urn:ietf:params:xml:ns:vcard-4.0' }); + if pep_service:purge("urn:xmpp:avatar:metadata", origin.full_jid) then + pep_service:publish("urn:xmpp:avatar:data", origin.full_jid); + end + vcard4:tag("fn"):text_tag("text", vcard_temp:get_child_text("FN")):up(); local N = vcard_temp:get_child("N"); |