mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
feat: #702
This commit is contained in:
@@ -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),
|
||||||
|
};
|
||||||
|
Reference in New Issue
Block a user