mod_vcard_legacy: Clear avatars on setting a vcard-temp

Otherwise it is not possible to remove avatars
remotes/origin/0.11
Kim Alvefur 8 years ago
parent c8924fdfe4
commit 3d17f4e04c
  1. 4
      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");

Loading…
Cancel
Save