mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 12:25:51 +00:00
Update index.js
This commit is contained in:
5
index.js
5
index.js
@@ -488,6 +488,11 @@ jQuery(async () => {
|
|||||||
eventSource.on(event_types.IMPERSONATE_READY, onMessageReceived);
|
eventSource.on(event_types.IMPERSONATE_READY, onMessageReceived);
|
||||||
eventSource.on(event_types.MESSAGE_RECEIVED, (chat_id) => handleTableUpdate(chat_id));
|
eventSource.on(event_types.MESSAGE_RECEIVED, (chat_id) => handleTableUpdate(chat_id));
|
||||||
eventSource.on(event_types.MESSAGE_SWIPED, (chat_id) => {
|
eventSource.on(event_types.MESSAGE_SWIPED, (chat_id) => {
|
||||||
|
const context = getContext();
|
||||||
|
if (context.chat.length < 2) {
|
||||||
|
log(`【监察系统】检测到消息滑动,但聊天记录不足2条,已跳过状态回退。`, 'info');
|
||||||
|
return;
|
||||||
|
}
|
||||||
log(`【监察系统】检测到消息滑动 (SWIPED),开始执行状态回退...`, 'warn');
|
log(`【监察系统】检测到消息滑动 (SWIPED),开始执行状态回退...`, 'warn');
|
||||||
rollbackState();
|
rollbackState();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user