From c1d9a36072c311fc3938461a691fb38bd7fc52e1 Mon Sep 17 00:00:00 2001 From: vyneer Date: Mon, 23 Oct 2023 20:43:17 +0300 Subject: [PATCH] fix: message history limit not applying --- assets/chat/js/history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/chat/js/history.js b/assets/chat/js/history.js index 63c9e797..559fad16 100644 --- a/assets/chat/js/history.js +++ b/assets/chat/js/history.js @@ -71,7 +71,7 @@ class ChatInputHistory { this.history.push(message); // limit entries if (this.history.length > this.maxentries) - this.history.slice(-this.maxentries); + this.history.splice(0, this.history.length - this.maxentries); ChatStore.write('chat.history', this.history); } }