Software /
code /
prosody
Comparison
plugins/mod_vcard_legacy.lua @ 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 |
parent | 9258:0cc535668fce |
child | 9260:0fc6ffc57dc0 |
comparison
equal
deleted
inserted
replaced
9258:0cc535668fce | 9259:926a88dd5c54 |
---|---|
131 | 131 |
132 local vcard_temp = stanza.tags[1]; | 132 local vcard_temp = stanza.tags[1]; |
133 | 133 |
134 local vcard4 = st.stanza("item", { xmlns = "http://jabber.org/protocol/pubsub", id = "current" }) | 134 local vcard4 = st.stanza("item", { xmlns = "http://jabber.org/protocol/pubsub", id = "current" }) |
135 :tag("vcard", { xmlns = 'urn:ietf:params:xml:ns:vcard-4.0' }); | 135 :tag("vcard", { xmlns = 'urn:ietf:params:xml:ns:vcard-4.0' }); |
136 | |
137 if pep_service:purge("urn:xmpp:avatar:metadata", origin.full_jid) then | |
138 pep_service:publish("urn:xmpp:avatar:data", origin.full_jid); | |
139 end | |
136 | 140 |
137 vcard4:tag("fn"):text_tag("text", vcard_temp:get_child_text("FN")):up(); | 141 vcard4:tag("fn"):text_tag("text", vcard_temp:get_child_text("FN")):up(); |
138 | 142 |
139 local N = vcard_temp:get_child("N"); | 143 local N = vcard_temp:get_child("N"); |
140 | 144 |