This commit is contained in:
Raven Scott 2024-06-04 00:57:28 -04:00
parent 1d7f69ccd2
commit ef312ad068

9
app.js
View File

@ -267,4 +267,13 @@ function onMessageAdded(from, message, avatar) {
document.querySelector('#messages').appendChild($div); 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(); initialize();