refactor: 移除无缝升级函数

This commit is contained in:
手瓜一十雪 2024-06-11 15:46:27 +08:00
parent b9d1d84716
commit 3697c2ced8
4 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,11 @@
# v1.5.5
QQ Version: Windows 9.9.11-24568 / Linux 3.2.9-23568
## 修复与优化
* 紧急修复视频与文件问题
## 新增与调整
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)

View File

@ -23,7 +23,7 @@ program
.parse(process.argv);
// 无缝升级旧的配置到新的 应在1.3.5发布 1.5.5 左右移除兼容支持
UpdateConfig().catch(logError);
// UpdateConfig().catch(logError); 移除支持
// 启动WebUi
InitWebUi();
const cmdOptions = program.opts();

View File

@ -197,6 +197,19 @@ export class OB11Constructor {
message_data['data']['url'] = videoDownUrl;
message_data['data']['file_id'] = videoOrFileElement.fileUuid;
message_data['data']['file_size'] = videoOrFileElement.fileSize;
if (!element.videoElement) {
dbUtil.addFileCache({
msgId: msg.msgId,
name: videoOrFileElement.fileName,
path: videoOrFileElement.filePath,
size: parseInt(videoOrFileElement.fileSize || '0'),
uuid: videoOrFileElement.fileUuid || '',
url: '',
element: element.videoElement || element.fileElement,
elementType: element.videoElement ? ElementType.VIDEO : ElementType.FILE,
elementId: element.elementId
}).then();
}
}
else if (element.pttElement) {
message_data['type'] = OB11MessageDataType.voice;