style: lint
This commit is contained in:
1 parent
964874bdad
commit
030ba15952
27 files changed
+167
-167
No files matched your search
@@ -1,12 +1,12 @@
|
||||
import {PushMsgBody} from "@/core/packet/proto/message/message";
|
||||
import {NapProtoEncodeStructType} from "@/core/packet/proto/NapProto";
|
||||
import { PushMsgBody } from "@/core/packet/proto/message/message";
|
||||
import { NapProtoEncodeStructType } from "@/core/packet/proto/NapProto";
|
||||
import * as crypto from "crypto";
|
||||
import {PacketForwardNode} from "@/core/packet/msg/entity/forward";
|
||||
import { PacketForwardNode } from "@/core/packet/msg/entity/forward";
|
||||
|
||||
export class PacketMsgBuilder {
|
||||
buildFakeMsg(selfUid: string, element: PacketForwardNode[]): NapProtoEncodeStructType<typeof PushMsgBody>[] {
|
||||
return element.map((node): NapProtoEncodeStructType<typeof PushMsgBody> => {
|
||||
const avatar = `https://q.qlogo.cn/headimg_dl?dst_uin=${node.senderId}&spec=640&img_type=jpg`
|
||||
const avatar = `https://q.qlogo.cn/headimg_dl?dst_uin=${node.senderId}&spec=640&img_type=jpg`;
|
||||
return {
|
||||
responseHead: {
|
||||
fromUid: "",
|
||||
@@ -46,7 +46,7 @@ export class PacketMsgBuilder {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import {NapProtoEncodeStructType, NapProtoMsg} from "@/core/packet/proto/NapProto";
|
||||
import {Elem, MentionExtra} from "@/core/packet/proto/message/element";
|
||||
import { NapProtoEncodeStructType, NapProtoMsg } from "@/core/packet/proto/NapProto";
|
||||
import { Elem, MentionExtra } from "@/core/packet/proto/message/element";
|
||||
import {
|
||||
AtType,
|
||||
SendArkElement,
|
||||
@@ -54,23 +54,23 @@ export class PacketMsgAtElement extends PacketMsgTextElement {
|
||||
constructor(element: SendTextElement) {
|
||||
super(element);
|
||||
this.targetUid = element.textElement.atNtUid;
|
||||
this.atAll = element.textElement.atType === AtType.atAll
|
||||
this.atAll = element.textElement.atType === AtType.atAll;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem> {
|
||||
const res = new NapProtoMsg(MentionExtra).encode({
|
||||
type: this.atAll ? 1 : 2,
|
||||
uin: 0,
|
||||
field5: 0,
|
||||
uid: this.targetUid,
|
||||
}
|
||||
)
|
||||
type: this.atAll ? 1 : 2,
|
||||
uin: 0,
|
||||
field5: 0,
|
||||
uid: this.targetUid,
|
||||
}
|
||||
);
|
||||
return {
|
||||
text: {
|
||||
str: this.text,
|
||||
pbReserve: res
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {IPacketMsgElement} from "@/core/packet/msg/element";
|
||||
import {SendMessageElement} from "@/core";
|
||||
import { IPacketMsgElement } from "@/core/packet/msg/element";
|
||||
import { SendMessageElement } from "@/core";
|
||||
|
||||
export interface PacketForwardNode {
|
||||
groupId?: number
|
||||
|
||||
Reference in new issue
Block a user