mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: #332
This commit is contained in:
parent
a5ce424a40
commit
7d91e05a69
@ -28,18 +28,14 @@ class DeleteMsg extends BaseAction<Payload, void> {
|
|||||||
const ret = this.core.eventWrapper.registerListen(
|
const ret = this.core.eventWrapper.registerListen(
|
||||||
'NodeIKernelMsgListener/onMsgInfoListUpdate',
|
'NodeIKernelMsgListener/onMsgInfoListUpdate',
|
||||||
1,
|
1,
|
||||||
5000,
|
1000,
|
||||||
(msgs) => !!msgs.find(m => m.msgId === msg.MsgId && m.recallTime !== '0'),
|
(msgs) => !!msgs.find(m => m.msgId === msg.MsgId && m.recallTime !== '0'),
|
||||||
).catch(() => new Promise<undefined>((resolve) => {
|
).catch(() => undefined);
|
||||||
resolve(undefined);
|
|
||||||
}));
|
|
||||||
await this.core.apis.MsgApi.recallMsg(msg.Peer, [msg.MsgId]);
|
await this.core.apis.MsgApi.recallMsg(msg.Peer, [msg.MsgId]);
|
||||||
const data = await ret;
|
const data = await ret;
|
||||||
if (!data) {
|
if (!data) throw new Error('Recall failed');
|
||||||
//throw new Error('Recall failed');
|
} else {
|
||||||
}
|
throw new Error('Recall failed');
|
||||||
//await sleep(100);
|
|
||||||
//await NTQQMsgApi.getMsgsByMsgId(msg.Peer, [msg.MsgId]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user