mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
refactor: 移除不再使用的代码
This commit is contained in:
@@ -1,49 +0,0 @@
|
|||||||
// TODO: further refactor in NapCat.Packet v2
|
|
||||||
import { NapProtoMsg, ProtoField, ScalarType } from "@napneko/nap-proto-core";
|
|
||||||
|
|
||||||
const BodyInner = {
|
|
||||||
msgType: ProtoField(1, ScalarType.UINT32, true),
|
|
||||||
subType: ProtoField(2, ScalarType.UINT32, true)
|
|
||||||
};
|
|
||||||
|
|
||||||
const NoifyData = {
|
|
||||||
skip: ProtoField(1, ScalarType.BYTES, true),
|
|
||||||
innerData: ProtoField(2, ScalarType.BYTES, true)
|
|
||||||
};
|
|
||||||
|
|
||||||
const MsgHead = {
|
|
||||||
bodyInner: ProtoField(2, () => BodyInner, true),
|
|
||||||
noifyData: ProtoField(3, () => NoifyData, true)
|
|
||||||
};
|
|
||||||
|
|
||||||
const Message = {
|
|
||||||
msgHead: ProtoField(1, () => MsgHead)
|
|
||||||
};
|
|
||||||
|
|
||||||
const SubDetail = {
|
|
||||||
msgSeq: ProtoField(1, ScalarType.UINT32),
|
|
||||||
msgTime: ProtoField(2, ScalarType.UINT32),
|
|
||||||
senderUid: ProtoField(6, ScalarType.STRING)
|
|
||||||
};
|
|
||||||
|
|
||||||
const RecallDetails = {
|
|
||||||
operatorUid: ProtoField(1, ScalarType.STRING),
|
|
||||||
subDetail: ProtoField(3, () => SubDetail)
|
|
||||||
};
|
|
||||||
|
|
||||||
const RecallGroup = {
|
|
||||||
type: ProtoField(1, ScalarType.INT32),
|
|
||||||
peerUid: ProtoField(4, ScalarType.UINT32),
|
|
||||||
recallDetails: ProtoField(11, () => RecallDetails),
|
|
||||||
grayTipsSeq: ProtoField(37, ScalarType.UINT32)
|
|
||||||
};
|
|
||||||
|
|
||||||
export function decodeMessage(buffer: Uint8Array) {
|
|
||||||
const msg = new NapProtoMsg(Message);
|
|
||||||
return msg.decode(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function decodeRecallGroup(buffer: Uint8Array){
|
|
||||||
const msg = new NapProtoMsg(RecallGroup);
|
|
||||||
return msg.decode(buffer);
|
|
||||||
}
|
|
Reference in New Issue
Block a user