Merge branch 'main' into upmain

This commit is contained in:
Alen 2024-10-26 07:22:25 +08:00
commit eebcd0700d
3 changed files with 5 additions and 3 deletions

View File

@ -50,7 +50,7 @@ export class PacketMsgBuilder {
divSeq: node.groupId ? undefined : 4, divSeq: node.groupId ? undefined : 4,
msgId: crypto.randomBytes(4).readUInt32LE(0), msgId: crypto.randomBytes(4).readUInt32LE(0),
sequence: crypto.randomBytes(4).readUInt32LE(0), sequence: crypto.randomBytes(4).readUInt32LE(0),
timeStamp: Math.floor(Date.now() / 1000), timeStamp: +node.time.toString().substring(0, 10),
field7: BigInt(1), field7: BigInt(1),
field8: 0, field8: 0,
field9: 0, field9: 0,

View File

@ -187,7 +187,7 @@ export class SendMsg extends BaseAction<OB11PostSendMsg, ReturnDataType> {
senderUin: Number(node.data.user_id ?? parentMeta?.user_id) || +this.core.selfInfo.uin, senderUin: Number(node.data.user_id ?? parentMeta?.user_id) || +this.core.selfInfo.uin,
senderName: node.data.nickname ?? parentMeta?.nickname ?? "QQ用户", senderName: node.data.nickname ?? parentMeta?.nickname ?? "QQ用户",
groupId: msgPeer.chatType === ChatType.KCHATTYPEGROUP ? +msgPeer.peerUid : undefined, groupId: msgPeer.chatType === ChatType.KCHATTYPEGROUP ? +msgPeer.peerUid : undefined,
time: Date.now(), time: Number(node.data.time) || Date.now(),
msg: sendElements, msg: sendElements,
}; };
logger.logDebug(`handleForwardedNodesPacket 开始转换 ${JSON.stringify(packetMsgElements)}`); logger.logDebug(`handleForwardedNodesPacket 开始转换 ${JSON.stringify(packetMsgElements)}`);

View File

@ -156,6 +156,7 @@ export interface OB11MessageNode {
news?: { text: string }[], news?: { text: string }[],
summary?: string, summary?: string,
prompt?: string prompt?: string
time?: string
}; };
} }
@ -229,6 +230,7 @@ export interface OB11PostSendMsg {
news?: { text: string }[], news?: { text: string }[],
summary?: string, summary?: string,
prompt?: string prompt?: string
time?: string
} }
export interface OB11PostContext { export interface OB11PostContext {
message_type?: 'private' | 'group' message_type?: 'private' | 'group'