(client: TelegramClient, userId: number)
| 467 | try { |
| 468 | const peer = await client.getInputEntity(userId); |
| 469 | await client.invoke(new Api.folders.EditPeerFolders({ |
| 470 | folderPeers: [new Api.InputFolderPeer({ peer, folderId: 0 })] |
| 471 | })); |
| 472 | } catch (e) { log(LogLevel.ERROR, `unarchive failed ${userId}`, e); } |
| 473 | } |
| 474 | |
| 475 | async function runFailActions(client: TelegramClient, userId: number) { |
| 476 | await archiveChat(client, userId); |
| 477 | await muteChat(client, userId); |
| 478 | |
| 479 | for (const a of cfg.failActions()) { |