refactor: inline all NTQQXxxApi uses

This commit is contained in:
Wesley F. Young committed 2024-08-31 16:00:03 +08:00
1 parent 78452cf6a9
commit b5deb198de
60 files changed
+130 -281

No files matched your search

+1 -2
View File
@@ -23,7 +23,6 @@ class DeleteMsg extends BaseAction<Payload, void> {
payloadSchema = SchemaData;
async _handle(payload: Payload) {
const NTQQMsgApi = this.core.apis.MsgApi;
const msg = MessageUnique.getMsgIdAndPeerByShortId(Number(payload.message_id));
if (msg) {
const ret = this.core.eventWrapper.registerListen(
@@ -34,7 +33,7 @@ class DeleteMsg extends BaseAction<Payload, void> {
).catch(() => new Promise<undefined>((resolve) => {
resolve(undefined);
}));
await NTQQMsgApi.recallMsg(msg.Peer, [msg.MsgId]);
await this.core.apis.MsgApi.recallMsg(msg.Peer, [msg.MsgId]);
const data = await ret;
if (!data) {
//throw new Error('Recall failed');