Fix /hide not targeting not visible messages
This commit is contained in:
parent
de2dd0e087
commit
4e907ff3e8
|
@ -135,10 +135,11 @@ export async function hideChatMessageRange(start, end, unhide) {
|
||||||
const message = chat[messageId];
|
const message = chat[messageId];
|
||||||
if (!message) continue;
|
if (!message) continue;
|
||||||
|
|
||||||
|
message.is_system = hide;
|
||||||
|
|
||||||
|
// Also toggle "hidden" state for all visible messages
|
||||||
const messageBlock = $(`.mes[mesid="${messageId}"]`);
|
const messageBlock = $(`.mes[mesid="${messageId}"]`);
|
||||||
if (!messageBlock.length) continue;
|
if (!messageBlock.length) continue;
|
||||||
|
|
||||||
message.is_system = hide;
|
|
||||||
messageBlock.attr('is_system', String(hide));
|
messageBlock.attr('is_system', String(hide));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue