forked from snxraven/LinkUp-P2P-Chat
Up to date fork #1
13
app.js
13
app.js
@ -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');
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user