|
|
@@ -243,7 +243,8 @@ async function sendMessage(message) {
|
|
|
mentions.forEach(mention => {
|
|
|
const username = mention.slice(1);
|
|
|
const exist = mentions_repeated.find(u => u === username);
|
|
|
- if (!exist && username === chatUserName) return; // don't mention myself if multiple mentions
|
|
|
+ console.log("Mentioned user:", username,"List", mentions_repeated, "Exist before:", exist);
|
|
|
+ if (exist || username === chatUserName) return; // don't mention myself if multiple mentions
|
|
|
mentions_repeated.push(username);
|
|
|
if (username === "IAKlein"){
|
|
|
sendMessageToAI(message);
|
|
|
@@ -272,10 +273,14 @@ function initializeChat() {
|
|
|
event.preventDefault();
|
|
|
if (chatInputElement.value.trim() === "") return;
|
|
|
|
|
|
+ chatForm.querySelector("button").animate(
|
|
|
+ [{ transform: 'scale(1)' }, { transform: 'scale(0.9)' }, { transform: 'scale(1)' }],
|
|
|
+ { duration: 200, iterations: 1, easing: 'ease-in-out' }
|
|
|
+ )
|
|
|
sendMessage(chatInputElement.value.trim());
|
|
|
chatInputElement.value = "";
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
let debounceTimer;
|
|
|
chatInputElement.addEventListener("input", () => {
|
|
|
const lastWord = chatInputElement.value.split(" ").at(-1);
|