fix: get file way 01 get by msg & seq id

This commit is contained in:
Wesley F. Young
2024-08-31 20:30:42 +08:00
parent c74b2e78c2
commit eaf3fd783a
2 changed files with 5 additions and 21 deletions

View File

@@ -106,12 +106,13 @@ export class OneBotMsgApi {
peerUid: msg.peerUid,
guildId: '',
};
const encodedFileId = FileNapCatOneBotUUID.encode(peer, msg.msgId, elementWrapper.elementId);
return {
type: OB11MessageDataType.image,
data: {
file: element.fileName,
file: encodedFileId,
sub_type: element.picSubType,
file_id: FileNapCatOneBotUUID.encode(peer, msg.msgId, elementWrapper.elementId),
file_id: encodedFileId,
url: await this.core.apis.FileApi.getImageUrl(element),
file_size: element.fileSize,
},