Mercurial > prosody-modules
diff mod_profile/mod_profile.lua @ 3321:628659e2e6b0
Backed out changeset 395835d89d88: Might still be needed
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 16 Sep 2018 13:08:04 +0200 |
parents | eec70a863d16 |
children | 682b05b4017e |
line wrap: on
line diff
--- a/mod_profile/mod_profile.lua Sat Sep 15 19:41:57 2018 +0200 +++ b/mod_profile/mod_profile.lua Sun Sep 16 13:08:04 2018 +0200 @@ -61,12 +61,14 @@ local photo, p = get_item(data, "PHOTO"); if vcard.to_vcard4 then if p then t_remove(data, p); end + pep:purge("urn:xmpp:vcard4", true) pep:publish("urn:xmpp:vcard4", true, item_container("current", vcard.to_vcard4(data))); if p then t_insert(data, p, photo); end end local nickname = get_item(data, "NICKNAME"); if nickname and nickname[1] then + pep:purge("http://jabber.org/protocol/nick", true); pep:publish("http://jabber.org/protocol/nick", true, item_container("current", st.stanza("nick", { xmlns="http://jabber.org/protocol/nick" }):text(nickname[1]))); end @@ -76,6 +78,8 @@ local photo_hash = sha1(photo_raw, true); local photo_type = photo.TYPE and photo.TYPE[1]; + pep:purge("urn:xmpp:avatar:metadata", true); + pep:purge("urn:xmpp:avatar:data", true); pep:publish("urn:xmpp:avatar:metadata", true, item_container(photo_hash, st.stanza("metadata", { xmlns="urn:xmpp:avatar:metadata" }) :tag("info", {