refactor: onMsgRecall

This commit is contained in:
手瓜一十雪 committed 2024-11-25 22:36:07 +08:00
1 parent 988c52ecc0
commit 5188e3c6b3
5 files changed
+24 -17

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
import { NapCatCore } from '@/core';
import { GrayTipRovokeElement, NapCatCore, RawMessage } from '@/core';
import { NapCatOneBot11Adapter } from '@/onebot';
import { OB11ProfileLikeEvent } from '@/onebot/event/notice/OB11ProfileLikeEvent';
import { decodeProfileLikeTip } from "@/core/helper/adaptDecoder";
@@ -11,7 +11,7 @@ export class OneBotUserApi {
this.obContext = obContext;
this.core = core;
}
async parseLikeEvent(wrappedBody: Uint8Array): Promise<OB11ProfileLikeEvent | undefined> {
const likeTip = decodeProfileLikeTip(Uint8Array.from(wrappedBody));
if (likeTip?.msgType !== 0 || likeTip?.subType !== 203) return;