perf: 就算收到自动转发的群文件也显示手动下载按钮

This commit is contained in:
clansty 2022-08-10 13:13:55 +08:00
parent 303f715874
commit 25703b2f61
1 changed files with 7 additions and 9 deletions

View File

@ -127,15 +127,13 @@ export default class ForwardService {
files.push(url);
}
}
else {
message = `文件: ${helper.htmlEscape(elem.name)}\n` +
`大小: ${helper.hSize(elem.size)}`;
const dbEntry = await db.file.create({
data: { fileId: elem.fid, roomId: pair.qqRoomId, info: message },
});
button = Button.url('📎获取下载地址',
`https://t.me/${this.tgBot.me.username}?start=file-${dbEntry.id}`);
}
message = `文件: ${helper.htmlEscape(elem.name)}\n` +
`大小: ${helper.hSize(elem.size)}`;
const dbEntry = await db.file.create({
data: { fileId: elem.fid, roomId: pair.qqRoomId, info: message },
});
button = Button.url('📎获取下载地址',
`https://t.me/${this.tgBot.me.username}?start=file-${dbEntry.id}`);
break;
}
case 'record': {