forked from snxraven/LinkUp-P2P-Chat
Fix usernames for bots
This commit is contained in:
parent
db88b09ba5
commit
66ae839318
2
app.js
2
app.js
@ -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');
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user