mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 04:45:46 +00:00
release: v1.8.1
This commit is contained in:
parent
c36bb77286
commit
a1f38fed7a
@ -1,21 +0,0 @@
|
||||
# v1.8.0
|
||||
|
||||
QQ Version: Windows 9.9.15-26702 / Linux 3.2.12-26702
|
||||
|
||||
## 启动的方式
|
||||
Way03/Way05
|
||||
|
||||
## 新增与调整
|
||||
1. 消息ID映射到UINT32空间
|
||||
2. 回复ID验证与修复
|
||||
3. 新API /fetch_emoji_like
|
||||
|
||||
```json5
|
||||
{
|
||||
"message_id": 1557274996,//消息ID
|
||||
"emojiType": "1",//可以从event事件获取 一般为1或者2
|
||||
"emojiId": "76"//可以从event事件获取 一个表情对应一个ID
|
||||
}
|
||||
```
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
13
docs/changelogs/CHANGELOG.v1.8.1.md
Normal file
13
docs/changelogs/CHANGELOG.v1.8.1.md
Normal file
@ -0,0 +1,13 @@
|
||||
# v1.8.1
|
||||
|
||||
QQ Version: Windows 9.9.15-26702 / Linux 3.2.12-26702
|
||||
|
||||
## 启动的方式
|
||||
Way03/Way05
|
||||
|
||||
## 新增与调整
|
||||
1. 多层转发消息解析
|
||||
2. 撤回消息附带反馈
|
||||
3. 文件上传兼容性提升
|
||||
|
||||
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
|
@ -2,7 +2,7 @@
|
||||
"name": "napcat",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"scripts": {
|
||||
"watch:dev": "vite --mode development",
|
||||
"watch:prod": "vite --mode production",
|
||||
|
@ -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([
|
||||
|
@ -163,7 +163,7 @@ async function onSettingWindowCreated(view) {
|
||||
SettingItem(
|
||||
'<span id="napcat-update-title">Napcat</span>',
|
||||
void 0,
|
||||
SettingButton("V1.8.0", "napcat-update-button", "secondary")
|
||||
SettingButton("V1.8.1", "napcat-update-button", "secondary")
|
||||
)
|
||||
]),
|
||||
SettingList([
|
||||
|
Loading…
Reference in New Issue
Block a user