Fix /hide not targeting not visible messages

This commit is contained in:
Wolfsblvt 2024-09-21 23:14:31 +02:00
parent de2dd0e087
commit 4e907ff3e8
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));
}