fix: migrateAllChats 时无法获取 entities

This commit is contained in:
Clansty 2022-03-05 21:19:25 +08:00
parent b3a90c19a6
commit f5602f81b7
No known key found for this signature in database
GPG Key ID: 05F8479BA63A8E92
1 changed files with 1 additions and 1 deletions

View File

@ -298,7 +298,7 @@ export default class ConfigService {
public async migrateAllChats(){
const dbPairs = await db.forwardPair.findMany();
for (const forwardPair of dbPairs) {
const chatForUser = await this.tgUser.getChat(bigInt(forwardPair.tgChatId))
const chatForUser = await this.tgUser.getChat(Number(forwardPair.tgChatId))
if(chatForUser.entity instanceof Api.Chat){
this.log.info('升级群组 ', chatForUser.id);
console.log(await chatForUser.migrate());