aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-21 15:20:50 +0200
committerKim Alvefur <zash@zash.se>2019-09-21 15:20:50 +0200
commiteeb98faa3a09ab9bdfeaa8ed9d2ff3d1d3a94de9 (patch)
treefcba3da5c58775484376275898c62647fede1289
parent4c6aca8604dd33cd4aff224720a4636a4ae593e3 (diff)
downloadprosody-eeb98faa3a09ab9bdfeaa8ed9d2ff3d1d3a94de9.tar.gz
prosody-eeb98faa3a09ab9bdfeaa8ed9d2ff3d1d3a94de9.zip
mod_vcard_legacy: Advertise lack of avatar correctly (fixes #1431) (thanks lovetox)
-rw-r--r--plugins/mod_vcard_legacy.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_vcard_legacy.lua b/plugins/mod_vcard_legacy.lua
index ab2c4490..6229b931 100644
--- a/plugins/mod_vcard_legacy.lua
+++ b/plugins/mod_vcard_legacy.lua
@@ -301,10 +301,10 @@ local function inject_xep153(event)
local pep_service = mod_pep.get_pep_service(username);
stanza:remove_children("x", "vcard-temp:x:update");
- local x_update = st.stanza("x", { xmlns = "vcard-temp:x:update" });
+ local x_update = st.stanza("x", { xmlns = "vcard-temp:x:update" }):tag("photo");
local ok, avatar_hash = pep_service:get_last_item("urn:xmpp:avatar:metadata", true);
if ok and avatar_hash then
- x_update:text_tag("photo", avatar_hash);
+ x_update:text(avatar_hash);
end
stanza:add_direct_child(x_update);
end