Skip to content

Commit

Permalink
fix: message history limit not applying
Browse files Browse the repository at this point in the history
  • Loading branch information
vyneer committed Oct 23, 2023
1 parent 3050349 commit c1d9a36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/chat/js/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit c1d9a36

Please sign in to comment.