forked from snxraven/LinkUp-P2P-Chat
fix
This commit is contained in:
parent
1d7f69ccd2
commit
ef312ad068
9
app.js
9
app.js
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user