Comparison

mod_pep_vcard_avatar/mod_pep_vcard_avatar.lua @ 2864:6f3859233515

mod_pep_vcard_avatar: Don't set avatar hash if already set
author Michel Le Bihan <michel@lebihan.pl>
date Fri, 26 Jan 2018 19:00:22 +0100
parent 2862:933049a60ce6
child 3177:4eff14ac6853
comparison
equal deleted inserted replaced
2863:f3485eb9cb8b 2864:6f3859233515
185 local photo = x_vcard_update:get_child("photo") 185 local photo = x_vcard_update:get_child("photo")
186 if not photo then 186 if not photo then
187 photo = st.stanza("photo") 187 photo = st.stanza("photo")
188 photo:text(hash) 188 photo:text(hash)
189 x_vcard_update:add_child(photo) 189 x_vcard_update:add_child(photo)
190 elseif photo:get_text() then
191 photo:text(hash)
192 end 190 end
193 end 191 end
194 end 192 end
195 193
196 module:hook("pre-presence/full", on_send_presence) 194 module:hook("pre-presence/full", on_send_presence)