Up to date fork #1

Merged
MiTask merged 33 commits from snxraven/LinkUp-P2P-Chat:main into main 2024-06-14 04:32:25 -04:00
2 changed files with 13 additions and 2 deletions
Showing only changes of commit 59e72998c6 - Show all commits

13
app.js
View File

@ -739,7 +739,7 @@ async function updateIcon(username, avatarBuffer) {
}
}
function clearMessages() {
function clearMessagesCMD() {
const messagesContainer = document.querySelector('#messages');
while (messagesContainer.firstChild) {
messagesContainer.removeChild(messagesContainer.firstChild);
@ -750,6 +750,17 @@ function clearMessages() {
messagesStore[topic] = [];
}
function clearMessages() {
const messagesContainer = document.querySelector('#messages');
while (messagesContainer.firstChild) {
messagesContainer.removeChild(messagesContainer.firstChild);
}
// Clear the messages from the store for the current room
// const topic = currentTopic();
// messagesStore[topic] = [];
}
function toggleSetupView() {
const setupDiv = document.querySelector('#setup');
setupDiv.classList.toggle('hidden');

View File

@ -20,7 +20,7 @@ export default async function handleCommand(command, context) {
switch (cmd) {
case '~clear':
clearMessages();
clearMessagesCMD();
break;
case '~ping':
addMessage('LinkUp', 'pong', agentAvatar, currentTopic());