refactor: packet x1

This commit is contained in:
pk5ls20 committed 2024-11-12 04:02:19 +08:00
1 parent af29c17814
commit 7fd94a03b7
105 files changed
+2286 -1962

No files matched your search

+2 -2
View File
@@ -1,8 +1,7 @@
import { NapCatCore } from '@/core';
import { decodeProfileLikeTip } from '@/core/packet/proto/old/ProfileLike';
import { NapCatOneBot11Adapter } from '@/onebot';
import { OB11ProfileLikeEvent } from '../event/notice/OB11ProfileLikeEvent';
import { decodeProfileLikeTip } from "@/core/helper/adaptDecoder";
export class OneBotUserApi {
obContext: NapCatOneBot11Adapter;
@@ -12,6 +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;