From ef312ad068954afb801bc5fd25b5a136476df020 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Tue, 4 Jun 2024 00:57:28 -0400 Subject: [PATCH] fix --- app.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app.js b/app.js index c99bcff..1730c4d 100644 --- a/app.js +++ b/app.js @@ -267,4 +267,13 @@ function onMessageAdded(from, message, avatar) { document.querySelector('#messages').appendChild($div); } +async function updateIcon(username, avatarBuffer) { + // Update the icon in the local HTML if necessary + // This can be adjusted as per your needs + const userIcon = document.querySelector(`img[src*="${username}.png"]`); + if (userIcon) { + userIcon.src = URL.createObjectURL(new Blob([avatarBuffer])); + } +} + initialize();