diff --git a/app.js b/app.js index 4a4c7a0..deb8e8e 100644 --- a/app.js +++ b/app.js @@ -170,7 +170,7 @@ function handleIncomingMessage(messageObj) { console.log('Received message:', messageObj); // Debugging log if (messageObj.type === 'icon') { - const username = messageObj.username; + const username = messageObj.name; if (messageObj.avatar) { try { const avatarBuffer = b4a.from(messageObj.avatar, 'base64'); diff --git a/chatBot/includes/message/Message.js b/chatBot/includes/message/Message.js index 3a2c9c0..fbb2fff 100644 --- a/chatBot/includes/message/Message.js +++ b/chatBot/includes/message/Message.js @@ -10,7 +10,7 @@ class Message { toJson() { return { type: this.type, - username: this.peerName, + name: this.peerName, avatar: this.peerAvatar, topic: this.topic, timestamp: this.timestamp