From 7461dadf88dbff47006849ea42f61c13c90894b1 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Thu, 13 Jun 2024 01:38:10 -0400 Subject: [PATCH] remove unused function --- .gitignore | 1 + app.js | 21 --------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index e87fbcc..5919b2c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ chatBot/.env chatBot/commands/ai.js config.json .idea +AIBot \ No newline at end of file diff --git a/app.js b/app.js index 30b0d47..5c31e12 100644 --- a/app.js +++ b/app.js @@ -440,27 +440,6 @@ async function handleFileInput(event) { } } -function sendFileMessage(name, fileUrl, fileType, avatar) { - const fileName = fileUrl.split('/').pop(); - const messageObj = JSON.stringify({ - type: 'file', - name, - fileName, - fileUrl, - fileType, - avatar, - topic: document.querySelector('#chat-room-topic').innerText, - timestamp: Date.now(), - }); - - const peers = [...swarm.connections]; - for (const peer of peers) { - peer.write(messageObj); - } - - addFileMessage(name, fileName, fileUrl, fileType, avatar, document.querySelector('#chat-room-topic').innerText); -} - function addFileMessage(from, fileName, fileUrl, fileType, avatar, topic) { console.log('Adding file message:', { from, fileName, fileUrl, fileType, avatar, topic }); // Debugging log const $div = document.createElement('div');