mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
release: v1.8.1
This commit is contained in:
@@ -65,7 +65,7 @@ export class OB11Constructor {
|
||||
real_id: msg.id!,
|
||||
message_type: msg.chatType == ChatType.group ? 'group' : 'private',
|
||||
sender: {
|
||||
user_id: parseInt(msg.senderUin!),
|
||||
user_id: parseInt(msg.senderUin || '0'),
|
||||
nickname: msg.sendNickName,
|
||||
card: msg.sendMemberName || '',
|
||||
},
|
||||
@@ -165,7 +165,10 @@ export class OB11Constructor {
|
||||
if (!replyMsg || records.msgRandom !== replyMsg.msgRandom) {
|
||||
replyMsg = (await NTQQMsgApi.getSingleMsg(peer, element.replyElement.replayMsgSeq)).msgList[0];
|
||||
}
|
||||
|
||||
if (msg.peerUin == '284840486') {
|
||||
//合并消息内侧 消息具体定位不到
|
||||
message_data['data']['id'] = MessageUnique.createMsg({ peerUid: msg.peerUid, guildId: '', chatType: msg.chatType }, records.msgId)?.toString();
|
||||
}
|
||||
if (!replyMsg || records.msgRandom !== replyMsg.msgRandom) {
|
||||
throw new Error('回复消息消息验证失败');
|
||||
}
|
||||
@@ -221,6 +224,9 @@ export class OB11Constructor {
|
||||
const videoElement: VideoElement = element.videoElement;
|
||||
//读取视频链接并兜底
|
||||
let videoUrl;//Array
|
||||
if (msg.peerUin = '284840486') {
|
||||
//合并消息内部 应该进行特殊处理
|
||||
}
|
||||
try {
|
||||
videoUrl = await NTQQFileApi.getVideoUrl({
|
||||
chatType: msg.chatType,
|
||||
@@ -338,12 +344,15 @@ export class OB11Constructor {
|
||||
//拉取下级消息
|
||||
if (!MultiMsgs) continue;
|
||||
//拉取失败则跳过
|
||||
message_data['data']['content'] = [];
|
||||
for (let MultiMsg of MultiMsgs) {
|
||||
//对每条拉取的消息传递ParentMsgPeer修正Peer
|
||||
MultiMsg.parentMsgPeer = ParentMsgPeer;
|
||||
MultiMsg.parentMsgIdList = msg.parentMsgIdList;
|
||||
MultiMsg.id = MessageUnique.createMsg(ParentMsgPeer, MultiMsg.msgId);//该ID仅用查看 无法调用
|
||||
let msgList = await OB11Constructor.message(MultiMsg);
|
||||
console.log(msgList);
|
||||
message_data['data']['content'].push(msgList);
|
||||
//console.log("合并消息", msgList);
|
||||
}
|
||||
}
|
||||
if ((message_data.type as string) !== 'unknown' && message_data.data) {
|
||||
|
||||
@@ -24,8 +24,13 @@ export async function logMessage(ob11Message: OB11Message) {
|
||||
}
|
||||
}
|
||||
if (ob11Message.message_type === 'group') {
|
||||
group = await getGroup(ob11Message.group_id!);
|
||||
prefix += `群[${group?.groupName}(${ob11Message.group_id})] `;
|
||||
if (ob11Message.group_id == 284840486) {
|
||||
group = await getGroup(ob11Message.group_id!);
|
||||
prefix += `转发消息[外部来源] `;
|
||||
} else {
|
||||
group = await getGroup(ob11Message.group_id!);
|
||||
prefix += `群[${group?.groupName}(${ob11Message.group_id})] `;
|
||||
}
|
||||
}
|
||||
let msgChain = '';
|
||||
if (Array.isArray(ob11Message.message)) {
|
||||
@@ -67,7 +72,11 @@ export async function logMessage(ob11Message: OB11Message) {
|
||||
msgParts.push(spSegColor(`[视频|${segment.data.url}]`));
|
||||
}
|
||||
else if (segment.type === 'forward') {
|
||||
msgParts.push(spSegColor(`[转发|${segment.data.id}]`));
|
||||
msgParts.push(spSegColor(`[转发|${segment.data.id}|消息开始]`));
|
||||
segment.data.content.forEach((msg) => {
|
||||
logMessage(msg);
|
||||
});
|
||||
msgParts.push(spSegColor(`[转发|${segment.data.id}|消息结束]`));
|
||||
}
|
||||
else {
|
||||
msgParts.push(spSegColor(`[未实现|${JSON.stringify(segment)}]`));
|
||||
|
||||
@@ -181,7 +181,8 @@ export interface OB11MessageMarkdown {
|
||||
export interface OB11MessageForward {
|
||||
type: OB11MessageDataType.forward
|
||||
data: {
|
||||
id: string
|
||||
id: string,
|
||||
content: OB11Message[]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = '1.8.0';
|
||||
export const version = '1.8.1';
|
||||
|
||||
@@ -29,7 +29,7 @@ async function onSettingWindowCreated(view: Element) {
|
||||
SettingItem(
|
||||
'<span id="napcat-update-title">Napcat</span>',
|
||||
undefined,
|
||||
SettingButton('V1.8.0', 'napcat-update-button', 'secondary')
|
||||
SettingButton('V1.8.1', 'napcat-update-button', 'secondary')
|
||||
),
|
||||
]),
|
||||
SettingList([
|
||||
|
||||
Reference in New Issue
Block a user