feat: 文件移除path字段增强部分能力

This commit is contained in:
手瓜一十雪
2025-02-18 16:55:43 +08:00
parent fca2e3c51a
commit 7ea0a8cfbc

View File

@@ -132,7 +132,6 @@ export class OneBotMsgApi {
file: element.fileName, file: element.fileName,
sub_type: element.picSubType, sub_type: element.picSubType,
url: await this.core.apis.FileApi.getImageUrl(element), url: await this.core.apis.FileApi.getImageUrl(element),
path: element.filePath,
file_size: element.fileSize, file_size: element.fileSize,
}, },
}; };
@@ -148,13 +147,13 @@ export class OneBotMsgApi {
peerUid: msg.peerUid, peerUid: msg.peerUid,
guildId: '', guildId: '',
}; };
const file = FileNapCatOneBotUUID.encode(peer, msg.msgId, elementWrapper.elementId, element.fileUuid, element.fileUuid); FileNapCatOneBotUUID.encode(peer, msg.msgId, elementWrapper.elementId, element.fileUuid, element.fileUuid);
FileNapCatOneBotUUID.encode(peer, msg.msgId, elementWrapper.elementId, element.fileUuid, element.fileName);
return { return {
type: OB11MessageDataType.file, type: OB11MessageDataType.file,
data: { data: {
file: file, file: element.fileName,
path: element.filePath, file_id: element.fileUuid,
file_id: file,
file_size: element.fileSize, file_size: element.fileSize,
}, },
}; };
@@ -216,7 +215,6 @@ export class OneBotMsgApi {
data: { data: {
summary: _.faceName, // 商城表情名称 summary: _.faceName, // 商城表情名称
file: filename, file: filename,
path: url,
url: url, url: url,
key: _.key, key: _.key,
emoji_id: _.emojiId, emoji_id: _.emojiId,
@@ -339,7 +337,6 @@ export class OneBotMsgApi {
type: OB11MessageDataType.video, type: OB11MessageDataType.video,
data: { data: {
file: fileCode, file: fileCode,
path: videoDownUrl,
url: videoDownUrl, url: videoDownUrl,
file_size: element.fileSize, file_size: element.fileSize,
}, },
@@ -357,7 +354,6 @@ export class OneBotMsgApi {
type: OB11MessageDataType.voice, type: OB11MessageDataType.voice,
data: { data: {
file: fileCode, file: fileCode,
path: element.filePath,
file_size: element.fileSize, file_size: element.fileSize,
}, },
}; };