mirror of https://github.com/Nofated095/Q2TG.git
fix: migrateAllChats 时无法获取 entities
This commit is contained in:
parent
b3a90c19a6
commit
f5602f81b7
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue