Software /
code /
prosody
Comparison
plugins/mod_vcard_legacy.lua @ 9270:b024fae6919e
mod_vcard_legacy: Rename variable for consistency
The variable holding the PEP service was `pep_service`, except in the
XEP-0153 section.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 07 Sep 2018 00:36:31 +0200 |
parent | 9269:6097dc7d4847 |
child | 9271:651e945ad971 |
comparison
equal
deleted
inserted
replaced
9269:6097dc7d4847 | 9270:b024fae6919e |
---|---|
264 | 264 |
265 local function inject_xep153(event) | 265 local function inject_xep153(event) |
266 local origin, stanza = event.origin, event.stanza; | 266 local origin, stanza = event.origin, event.stanza; |
267 local username = origin.username; | 267 local username = origin.username; |
268 if not username then return end | 268 if not username then return end |
269 local pep = mod_pep.get_pep_service(username); | 269 local pep_service = mod_pep.get_pep_service(username); |
270 | 270 |
271 stanza:remove_children("x", "vcard-temp:x:update"); | 271 stanza:remove_children("x", "vcard-temp:x:update"); |
272 local x_update = st.stanza("x", { xmlns = "vcard-temp:x:update" }); | 272 local x_update = st.stanza("x", { xmlns = "vcard-temp:x:update" }); |
273 local ok, avatar_hash = pep:get_last_item("urn:xmpp:avatar:metadata", true); | 273 local ok, avatar_hash = pep_service:get_last_item("urn:xmpp:avatar:metadata", true); |
274 if ok and avatar_hash then | 274 if ok and avatar_hash then |
275 x_update:text_tag("photo", avatar_hash); | 275 x_update:text_tag("photo", avatar_hash); |
276 end | 276 end |
277 stanza:add_direct_child(x_update); | 277 stanza:add_direct_child(x_update); |
278 end | 278 end |