comparison plugins/muc/vcard.lib.lua @ 13660:31f8fd2bcab9

MUC: Don't inform people about the avatar hash when there is none
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 Feb 2025 10:19:36 +0000
parents 404d3644ac4a
children f4e16e6265e6
comparison
equal deleted inserted replaced
13659:5abdcad8c2e0 13660:31f8fd2bcab9
19 return hash; 19 return hash;
20 end 20 end
21 21
22 local function send_avatar_hash(room, to) 22 local function send_avatar_hash(room, to)
23 local hash = get_avatar_hash(room); 23 local hash = get_avatar_hash(room);
24 if not hash and to then return; end -- Don't announce when no avatar
24 25
25 local presence_vcard = st.presence({to = to, from = room.jid}) 26 local presence_vcard = st.presence({to = to, from = room.jid})
26 :tag("x", { xmlns = "vcard-temp:x:update" }) 27 :tag("x", { xmlns = "vcard-temp:x:update" })
27 :tag("photo"):text(hash):up(); 28 :tag("photo"):text(hash):up();
28 29