Software /
code /
prosody
Changeset
9259:926a88dd5c54
mod_vcard_legacy: Clear avatars on setting a vcard-temp
Otherwise it is not possible to remove avatars
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 01 Sep 2018 18:10:33 +0200 |
parents | 9258:0cc535668fce |
children | 9260:0fc6ffc57dc0 |
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 Sat Sep 01 23:43:19 2018 +0200 +++ b/plugins/mod_vcard_legacy.lua Sat Sep 01 18:10:33 2018 +0200 @@ -134,6 +134,10 @@ 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");