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

Method getAllManageableDialogs

aban/aban.ts:610–626  ·  view source on GitHub ↗
(client: TelegramClient)

Source from the content-addressed store, hash-verified

608 return new Api.InputChannel({
609 channelId: bigInt(group.id),
610 accessHash: bigInt(group.accessHash),
611 });
612 }
613 // 兜底:让 teleproto 走自己的 entity cache / dialogs 解析
614 return await client.getInputEntity(group.id);
615}
616
617/**
618 * 把 ManagedGroup 转成 PermissionManager 那一组方法能识别的 chatId。
619 * - channel:返回 InputChannel(带 accessHash),走 Api.channels.GetParticipant
620 * - basic group:返回 PeerChat-like 对象,让 getChatKind/getBasicGroupChatId 走 chat 路径
621 */
622async function resolvePermissionTarget(
623 client: TelegramClient,
624 group: ManagedGroup
625): Promise<any> {
626 if (group.kind === 'chat') {
627 return { className: 'PeerChat', chatId: bigInt(group.id) };
628 }
629 return await resolveChannelInput(client, group);

Callers 1

getManagedGroupsMethod · 0.95

Calls 1

collectDialogsFunction · 0.50

Tested by

no test coverage detected