Merge pull request #2890 from SillyTavern/fix-hide-on-hidden-messages

Fix /hide not targeting not visible messages
This commit is contained in:
Cohee 2024-09-22 00:19:07 +03:00 committed by GitHub
commit 1bc0630595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -135,10 +135,11 @@ export async function hideChatMessageRange(start, end, unhide) {
const message = chat[messageId];
if (!message) continue;
message.is_system = hide;
// Also toggle "hidden" state for all visible messages
const messageBlock = $(`.mes[mesid="${messageId}"]`);
if (!messageBlock.length) continue;
message.is_system = hide;
messageBlock.attr('is_system', String(hide));
}