MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / unarchiveChat

Function unarchiveChat

pmcaptcha/pmcaptcha.ts:469–476  ·  view source on GitHub ↗
(client: TelegramClient, userId: number)

Source from the content-addressed store, hash-verified

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
475async function runFailActions(client: TelegramClient, userId: number) {
476 await archiveChat(client, userId);
477 await muteChat(client, userId);
478
479 for (const a of cfg.failActions()) {

Callers 1

runPassActionsFunction · 0.85

Calls 1

logFunction · 0.85

Tested by

no test coverage detected