feat: add more msgElement

This commit is contained in:
pk5ls20 2024-10-18 04:49:38 +08:00
parent e4a533e7b7
commit 17e70a4360
No known key found for this signature in database
GPG Key ID: 6370ED7A169F493A

View File

@ -220,12 +220,6 @@ export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
}
}
export class PacketMsgPttElement extends IPacketMsgElement<SendPttElement> {
constructor(element: SendPttElement) {
super(element);
}
}
export class PacketMsgVideoElement extends IPacketMsgElement<SendVideoElement> {
constructor(element: SendVideoElement) {
super(element);
@ -238,6 +232,12 @@ export class PacketMsgFileElement extends IPacketMsgElement<SendFileElement> {
}
}
export class PacketMsgPttElement extends IPacketMsgElement<SendPttElement> {
constructor(element: SendPttElement) {
super(element);
}
}
export class PacketMsgLightAppElement extends IPacketMsgElement<SendArkElement> {
payload: string;
@ -258,28 +258,28 @@ export class PacketMsgLightAppElement extends IPacketMsgElement<SendArkElement>
}
}
export class PacketMsgMarkDownElement extends IPacketMsgElement<SendMarkdownElement> {
content: string;
constructor(element: SendMarkdownElement) {
super(element);
this.content = element.markdownElement.content;
}
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
return [{
commonElem: {
serviceType: 45,
pbElem: new NapProtoMsg(MarkdownData).encode({
content: this.content
}),
businessType: 1
}
}]
}
}
// TODO:
// export class PacketMsgMarkDownElement extends IPacketMsgElement<SendMarkdownElement> {
// content: string;
//
// constructor(element: SendMarkdownElement) {
// super(element);
// this.content = element.markdownElement.content;
// }
//
// buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
// return [{
// commonElem: {
// serviceType: 45,
// pbElem: new NapProtoMsg(MarkdownData).encode({
// content: this.content
// }),
// businessType: 1
// }
// }]
// }
// }
//
// export class PacketMsgLongMsgElement extends IPacketMsgElement<SendStructLongMsgElement> {
// resid: string;
//