Fix usernames for bots

This commit is contained in:
Raven Scott 2024-06-14 15:21:41 -04:00
parent db88b09ba5
commit 66ae839318
2 changed files with 2 additions and 2 deletions

2
app.js
View File

@ -170,7 +170,7 @@ function handleIncomingMessage(messageObj) {
console.log('Received message:', messageObj); // Debugging log console.log('Received message:', messageObj); // Debugging log
if (messageObj.type === 'icon') { if (messageObj.type === 'icon') {
const username = messageObj.username; const username = messageObj.name;
if (messageObj.avatar) { if (messageObj.avatar) {
try { try {
const avatarBuffer = b4a.from(messageObj.avatar, 'base64'); const avatarBuffer = b4a.from(messageObj.avatar, 'base64');

View File

@ -10,7 +10,7 @@ class Message {
toJson() { toJson() {
return { return {
type: this.type, type: this.type,
username: this.peerName, name: this.peerName,
avatar: this.peerAvatar, avatar: this.peerAvatar,
topic: this.topic, topic: this.topic,
timestamp: this.timestamp timestamp: this.timestamp