mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
61a00ffcbf | ||
![]() |
4b0a0f0a32 | ||
![]() |
15156bac1e | ||
![]() |
a898d2e7be |
@@ -4,7 +4,7 @@
|
|||||||
"name": "NapCatQQ",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "4.3.2",
|
"version": "4.3.3",
|
||||||
"icon": "./logo.png",
|
"icon": "./logo.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "4.3.2",
|
"version": "4.3.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
||||||
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
|
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
|
||||||
|
@@ -1 +1 @@
|
|||||||
export const napCatVersion = '4.3.2';
|
export const napCatVersion = '4.3.3';
|
||||||
|
8
src/core/external/appid.json
vendored
8
src/core/external/appid.json
vendored
@@ -166,5 +166,13 @@
|
|||||||
"9.9.17-31245": {
|
"9.9.17-31245": {
|
||||||
"appid": 537266450,
|
"appid": 537266450,
|
||||||
"qua": "V1_WIN_NQ_9.9.17_31245_GW_B"
|
"qua": "V1_WIN_NQ_9.9.17_31245_GW_B"
|
||||||
|
},
|
||||||
|
"3.2.15-31245": {
|
||||||
|
"appid": 537266485,
|
||||||
|
"qua": "V1_LNX_NQ_3.2.15_31245_GW_B"
|
||||||
|
},
|
||||||
|
"6.9.63-31245": {
|
||||||
|
"appid": 537266474,
|
||||||
|
"qua": "V1_MAC_NQ_6.9.63_31245_GW_B"
|
||||||
}
|
}
|
||||||
}
|
}
|
16
src/core/external/offset.json
vendored
16
src/core/external/offset.json
vendored
@@ -210,5 +210,21 @@
|
|||||||
"9.9.17-31245-x64": {
|
"9.9.17-31245-x64": {
|
||||||
"send": "39C1350",
|
"send": "39C1350",
|
||||||
"recv": "39C5784"
|
"recv": "39C5784"
|
||||||
|
},
|
||||||
|
"6.9.63.31245-x64": {
|
||||||
|
"send": "4720A40",
|
||||||
|
"recv": "47232AC"
|
||||||
|
},
|
||||||
|
"6.9.63-31245-arm64": {
|
||||||
|
"send": "41DCBD8",
|
||||||
|
"recv": "422D4E8"
|
||||||
|
},
|
||||||
|
"3.2.15-31245-x64": {
|
||||||
|
"send": "A550F80",
|
||||||
|
"recv": "A554880"
|
||||||
|
},
|
||||||
|
"3.2.15-31245-arm64": {
|
||||||
|
"send": "71BEBB8",
|
||||||
|
"recv": "71C23F0"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -256,6 +256,8 @@ export class PacketMsgPicElement extends IPacketMsgElement<SendPicElement> {
|
|||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
picType: PicType;
|
picType: PicType;
|
||||||
|
picSubType: number;
|
||||||
|
summary: string;
|
||||||
sha1: string | null = null;
|
sha1: string | null = null;
|
||||||
msgInfo: NapProtoEncodeStructType<typeof MsgInfo> | null = null;
|
msgInfo: NapProtoEncodeStructType<typeof MsgInfo> | null = null;
|
||||||
groupPicExt: NapProtoEncodeStructType<typeof CustomFace> | null = null;
|
groupPicExt: NapProtoEncodeStructType<typeof CustomFace> | null = null;
|
||||||
@@ -270,6 +272,10 @@ export class PacketMsgPicElement extends IPacketMsgElement<SendPicElement> {
|
|||||||
this.width = element.picElement.picWidth;
|
this.width = element.picElement.picWidth;
|
||||||
this.height = element.picElement.picHeight;
|
this.height = element.picElement.picHeight;
|
||||||
this.picType = element.picElement.picType;
|
this.picType = element.picElement.picType;
|
||||||
|
this.picSubType = element.picElement.picSubType ?? 0;
|
||||||
|
this.summary = element.picElement.summary === '' ? (
|
||||||
|
element.picElement.picSubType === 0 ? '[图片]' : '[动画表情]'
|
||||||
|
) : element.picElement.summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
get valid(): boolean {
|
get valid(): boolean {
|
||||||
@@ -288,7 +294,7 @@ export class PacketMsgPicElement extends IPacketMsgElement<SendPicElement> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toPreview(): string {
|
toPreview(): string {
|
||||||
return "[图片]";
|
return this.summary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -58,8 +58,11 @@ class UploadGroupImage extends PacketTransformer<typeof proto.NTV2RichMediaResp>
|
|||||||
compatQMsgSceneType: 2,
|
compatQMsgSceneType: 2,
|
||||||
extBizInfo: {
|
extBizInfo: {
|
||||||
pic: {
|
pic: {
|
||||||
bytesPbReserveTroop: Buffer.from("0800180020004200500062009201009a0100a2010c080012001800200028003a00", 'hex'),
|
bizType: img.picSubType,
|
||||||
textSummary: "Nya~", // TODO:
|
bytesPbReserveTroop: {
|
||||||
|
subType: img.picSubType,
|
||||||
|
},
|
||||||
|
textSummary: img.summary,
|
||||||
},
|
},
|
||||||
video: {
|
video: {
|
||||||
bytesPbReserve: Buffer.alloc(0),
|
bytesPbReserve: Buffer.alloc(0),
|
||||||
|
@@ -58,8 +58,11 @@ class UploadPrivateImage extends PacketTransformer<typeof proto.NTV2RichMediaRes
|
|||||||
compatQMsgSceneType: 1,
|
compatQMsgSceneType: 1,
|
||||||
extBizInfo: {
|
extBizInfo: {
|
||||||
pic: {
|
pic: {
|
||||||
bytesPbReserveTroop: Buffer.from("0800180020004200500062009201009a0100a2010c080012001800200028003a00", 'hex'),
|
bizType: img.picSubType,
|
||||||
textSummary: "Nya~", // TODO:
|
bytesPbReserveC2C: {
|
||||||
|
subType: img.picSubType,
|
||||||
|
},
|
||||||
|
textSummary: img.summary,
|
||||||
},
|
},
|
||||||
video: {
|
video: {
|
||||||
bytesPbReserve: Buffer.alloc(0),
|
bytesPbReserve: Buffer.alloc(0),
|
||||||
|
@@ -189,8 +189,8 @@ export const VideoExtBizInfo = {
|
|||||||
export const PicExtBizInfo = {
|
export const PicExtBizInfo = {
|
||||||
BizType: ProtoField(1, ScalarType.UINT32),
|
BizType: ProtoField(1, ScalarType.UINT32),
|
||||||
TextSummary: ProtoField(2, ScalarType.STRING),
|
TextSummary: ProtoField(2, ScalarType.STRING),
|
||||||
BytesPbReserveC2c: ProtoField(11, ScalarType.BYTES),
|
BytesPbReserveC2c: ProtoField(11, () => BytesPbReserveC2c),
|
||||||
BytesPbReserveTroop: ProtoField(12, ScalarType.BYTES),
|
BytesPbReserveTroop: ProtoField(12, () => BytesPbReserveTroop),
|
||||||
FromScene: ProtoField(1001, ScalarType.UINT32),
|
FromScene: ProtoField(1001, ScalarType.UINT32),
|
||||||
ToScene: ProtoField(1002, ScalarType.UINT32),
|
ToScene: ProtoField(1002, ScalarType.UINT32),
|
||||||
OldFileId: ProtoField(1003, ScalarType.UINT32),
|
OldFileId: ProtoField(1003, ScalarType.UINT32),
|
||||||
@@ -211,3 +211,27 @@ export const UploadInfo = {
|
|||||||
FileInfo: ProtoField(1, () => FileInfo),
|
FileInfo: ProtoField(1, () => FileInfo),
|
||||||
SubFileType: ProtoField(2, ScalarType.UINT32),
|
SubFileType: ProtoField(2, ScalarType.UINT32),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const BytesPbReserveC2c = {
|
||||||
|
subType: ProtoField(1, ScalarType.UINT32),
|
||||||
|
field3: ProtoField(3, ScalarType.UINT32),
|
||||||
|
field4: ProtoField(4, ScalarType.UINT32),
|
||||||
|
field8: ProtoField(8, ScalarType.STRING),
|
||||||
|
field10: ProtoField(10, ScalarType.UINT32),
|
||||||
|
field12: ProtoField(12, ScalarType.STRING),
|
||||||
|
field18: ProtoField(18, ScalarType.STRING),
|
||||||
|
field19: ProtoField(19, ScalarType.STRING),
|
||||||
|
field20: ProtoField(20, ScalarType.BYTES),
|
||||||
|
};
|
||||||
|
|
||||||
|
export const BytesPbReserveTroop = {
|
||||||
|
subType: ProtoField(1, ScalarType.UINT32),
|
||||||
|
field3: ProtoField(3, ScalarType.UINT32),
|
||||||
|
field4: ProtoField(4, ScalarType.UINT32),
|
||||||
|
field9: ProtoField(9, ScalarType.STRING),
|
||||||
|
field10: ProtoField(10, ScalarType.UINT32),
|
||||||
|
field12: ProtoField(12, ScalarType.STRING),
|
||||||
|
field18: ProtoField(18, ScalarType.STRING),
|
||||||
|
field19: ProtoField(19, ScalarType.STRING),
|
||||||
|
field21: ProtoField(21, ScalarType.BYTES),
|
||||||
|
};
|
||||||
|
@@ -19,7 +19,6 @@ export default class GoCQHTTPGetStrangerInfo extends OneBotAction<Payload, OB11U
|
|||||||
const extendData = await this.core.apis.UserApi.getUserDetailInfoByUin(user_id);
|
const extendData = await this.core.apis.UserApi.getUserDetailInfoByUin(user_id);
|
||||||
let uid = (await this.core.apis.UserApi.getUidByUinV2(user_id));
|
let uid = (await this.core.apis.UserApi.getUidByUinV2(user_id));
|
||||||
if (!uid) uid = extendData.detail.uid;
|
if (!uid) uid = extendData.detail.uid;
|
||||||
console.log(uid);
|
|
||||||
const info = (await this.core.apis.UserApi.getUserDetailInfo(uid));
|
const info = (await this.core.apis.UserApi.getUserDetailInfo(uid));
|
||||||
return {
|
return {
|
||||||
...extendData.detail.simpleInfo.coreInfo,
|
...extendData.detail.simpleInfo.coreInfo,
|
||||||
|
Reference in New Issue
Block a user