refactor: inline getApiContext()

This commit is contained in:
Wesley F. Young committed 2024-08-11 19:10:42 +08:00
1 parent 9f9749548a
commit e7e8e99946
71 files changed
+173 -167

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ export class FetchEmojiLike extends BaseAction<Payload, any> {
PayloadSchema = SchemaData;
async _handle(payload: Payload) {
const NTQQMsgApi = this.CoreContext.getApiContext().MsgApi;
const NTQQMsgApi = this.CoreContext.apis.MsgApi;
const msgIdPeer = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
if (!msgIdPeer) throw new Error('消息不存在');
const msg = (await NTQQMsgApi.getMsgsByMsgId(msgIdPeer.Peer, [msgIdPeer.MsgId])).msgList[0];