MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / mapChatType

Function mapChatType

packages/parser/src/formats/utils/telegram-utils.ts:48–64  ·  view source on GitHub ↗
(telegramType: string)

Source from the content-addressed store, hash-verified

46 * 将 Telegram 聊天类型映射到 ChatLab 聊天类型
47 */
48export function mapChatType(telegramType: string): ChatType {
49 switch (telegramType) {
50 case 'personal_chat':
51 case 'bot_chat':
52 case 'saved_messages':
53 return ChatType.PRIVATE
54 case 'private_group':
55 case 'public_group':
56 case 'private_supergroup':
57 case 'public_supergroup':
58 case 'private_channel':
59 case 'public_channel':
60 return ChatType.GROUP
61 default:
62 return ChatType.GROUP
63 }
64}
65
66/**
67 * 提取 Telegram text 字段为纯文本

Callers 2

parseTelegramSingleFunction · 0.90
parseTelegramFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected