git » sdk » commit cdd1faf

Ignore empty string avatar hash

author Stephen Paul Weber
2025-12-28 03:26:11 UTC
committer Stephen Paul Weber
2025-12-28 03:26:11 UTC
parent 61d5810983f8645fd376428700ca26e6db8be592

Ignore empty string avatar hash

borogove/Client.hx +1 -1

diff --git a/borogove/Client.hx b/borogove/Client.hx
index 9b0d3f2..4b9167f 100644
--- a/borogove/Client.hx
+++ b/borogove/Client.hx
@@ -339,7 +339,7 @@ class Client extends EventEmitter {
 
 				final mucUser = stanza.getChild("x", "http://jabber.org/protocol/muc#user");
 				final avatarSha1Hex = stanza.findText("{vcard-temp:x:update}x/photo#");
-				final avatarSha1 = avatarSha1Hex == null ? null : Hash.fromHex("sha-1", avatarSha1Hex);
+				final avatarSha1 = avatarSha1Hex == null || avatarSha1Hex == "" ? null : Hash.fromHex("sha-1", avatarSha1Hex);
 
 				if (c == null) {
 					chat.setPresence(JID.parse(stanza.attr.get("from")).resource, new Presence(null, mucUser, avatarSha1));