Compare commits

...

2 Commits

Author SHA1 Message Date
手瓜一十雪
410d6a85d7 fix: protobuf #417 2024-09-30 08:30:39 +08:00
手瓜一十雪
b693342e4f fix 2024-09-30 08:18:02 +08:00
6 changed files with 36 additions and 37 deletions

View File

@@ -4,7 +4,7 @@
"name": "NapCatQQ",
"slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现",
"version": "2.6.18",
"version": "2.6.19",
"icon": "./logo.png",
"authors": [
{

View File

@@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "2.6.18",
"version": "2.6.19",
"scripts": {
"build:framework": "vite build --mode framework",
"build:shell": "vite build --mode shell",

View File

@@ -1 +1 @@
export const napCatVersion = '2.6.18';
export const napCatVersion = '2.6.19';

View File

@@ -1,59 +1,58 @@
import { MessageType, BinaryReader, ScalarType, RepeatType } from '@protobuf-ts/runtime';
export const LikeDetailType = new MessageType("LikeDetailType", [
export const LikeDetail = new MessageType("likeDetail", [
{ no: 1, name: "txt", kind: "scalar", T: ScalarType.STRING /* string */ },
{ no: 2, name: "uin", kind: "scalar", T: ScalarType.INT64 /* int64 */ },
{ no: 3, name: "nickname", kind: "scalar", T: ScalarType.STRING /* string */ }
{ no: 3, name: "uin", kind: "scalar", T: ScalarType.INT64 /* int64 */ },
{ no: 5, name: "nickname", kind: "scalar", T: ScalarType.STRING /* string */ }
]);
export const LikeMsgType = new MessageType("LikeMsgType", [
export const LikeMsg = new MessageType("likeMsg", [
{ no: 1, name: "times", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 2, name: "time", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 3, name: "detail", kind: "message", T: () => LikeDetailType }
{ no: 3, name: "detail", kind: "message", T: () => LikeDetail }
]);
export const ProfileLikeSubTipType = new MessageType("ProfileLikeSubTipType", [
{ no: 1, name: "msg", kind: "message", T: () => LikeMsgType }
export const ProfileLikeSubTip = new MessageType("profileLikeSubTip", [
{ no: 14, name: "msg", kind: "message", T: () => LikeMsg }
]);
export const ProfileLikeTipType = new MessageType("ProfileLikeTipType", [
export const ProfileLikeTip = new MessageType("profileLikeTip", [
{ no: 1, name: "msgType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 2, name: "subType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 3, name: "content", kind: "message", T: () => ProfileLikeSubTipType }
{ no: 203, name: "content", kind: "message", T: () => ProfileLikeSubTip }
]);
export const SysMessageHeader = new MessageType("SysMessageHeader", [
{ no: 1, name: "PeerNumber", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
{ no: 2, name: "PeerString", kind: "scalar", T: ScalarType.STRING /* string */ },
{ no: 5, name: "Uin", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
{ no: 6, name: "Uid", kind: "scalar", T: ScalarType.STRING /* string */, opt: true }
]);
export const SysMessageHeaderType = new MessageType("SysMessageHeaderType", [
{ no: 1, name: "id", kind: "scalar", T: ScalarType.STRING /* string */ },
{ no: 2, name: "timestamp", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 3, name: "sender", kind: "scalar", T: ScalarType.STRING /* string */ }
export const SysMessageMsgSpec = new MessageType("SysMessageMsgSpec", [
{ no: 1, name: "msgType", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
{ no: 2, name: "subType", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
{ no: 3, name: "subSubType", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
{ no: 5, name: "msgSeq", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
{ no: 6, name: "time", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ },
{ no: 12, name: "msgId", kind: "scalar", T: ScalarType.UINT64 /* uint64 */ },
{ no: 13, name: "other", kind: "scalar", T: ScalarType.UINT32 /* uint32 */ }
]);
export const SysMessageMsgSpecType = new MessageType("SysMessageMsgSpecType", [
{ no: 1, name: "msgType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 2, name: "subType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 3, name: "subSubType", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 4, name: "msgSeq", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 5, name: "time", kind: "scalar", T: ScalarType.INT32 /* int32 */ },
{ no: 6, name: "msgId", kind: "scalar", T: ScalarType.INT64 /* int64 */ },
{ no: 7, name: "other", kind: "scalar", T: ScalarType.INT32 /* int32 */ }
export const SysMessageBodyWrapper = new MessageType("SysMessageBodyWrapper", [
{ no: 2, name: "wrappedBody", kind: "scalar", T: ScalarType.BYTES /* bytes */ }
]);
export const SysMessageBodyWrapperType = new MessageType("SysMessageBodyWrapperType", [
{ no: 1, name: "wrappedBody", kind: "scalar", T: ScalarType.BYTES /* bytes */ }
]);
export const SysMessageType = new MessageType("SysMessageType", [
{ no: 1, name: "header", kind: "message", T: () => SysMessageHeaderType, repeat: RepeatType.PACKED },
{ no: 2, name: "msgSpec", kind: "message", T: () => SysMessageMsgSpecType, repeat: RepeatType.PACKED },
{ no: 3, name: "bodyWrapper", kind: "message", T: () => SysMessageBodyWrapperType }
export const SysMessage = new MessageType("SysMessage", [
{ no: 1, name: "header", kind: "message", T: () => SysMessageHeader, repeat: RepeatType.UNPACKED },
{ no: 2, name: "msgSpec", kind: "message", T: () => SysMessageMsgSpec, repeat: RepeatType.UNPACKED },
{ no: 3, name: "bodyWrapper", kind: "message", T: () => SysMessageBodyWrapper }
]);
export function decodeProfileLikeTip(buffer: Uint8Array): any {
const reader = new BinaryReader(buffer);
return ProfileLikeTipType.internalBinaryRead(reader, reader.len, { readUnknownField: true, readerFactory: () => new BinaryReader(buffer) });
return ProfileLikeTip.internalBinaryRead(reader, reader.len, { readUnknownField: true, readerFactory: () => new BinaryReader(buffer) });
}
export function decodeSysMessage(buffer: Uint8Array): any {
const reader = new BinaryReader(buffer);
return SysMessageType.internalBinaryRead(reader, reader.len, { readUnknownField: true, readerFactory: () => new BinaryReader(buffer) });
return SysMessage.internalBinaryRead(reader, reader.len, { readUnknownField: true, readerFactory: () => new BinaryReader(buffer) });
}

View File

@@ -30,7 +30,7 @@ async function onSettingWindowCreated(view: Element) {
SettingItem(
'<span id="napcat-update-title">Napcat</span>',
undefined,
SettingButton('V2.6.18', 'napcat-update-button', 'secondary'),
SettingButton('V2.6.19', 'napcat-update-button', 'secondary'),
),
]),
SettingList([

View File

@@ -164,7 +164,7 @@ async function onSettingWindowCreated(view) {
SettingItem(
'<span id="napcat-update-title">Napcat</span>',
void 0,
SettingButton("V2.6.18", "napcat-update-button", "secondary")
SettingButton("V2.6.19", "napcat-update-button", "secondary")
)
]),
SettingList([