From 66ae839318dadff0318c75077b0f91dd3ebe0f08 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Fri, 14 Jun 2024 15:21:41 -0400 Subject: [PATCH] Fix usernames for bots --- app.js | 2 +- chatBot/includes/message/Message.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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