feat: 平台类型修改

This commit is contained in:
digua
2025-12-21 16:50:25 +08:00
parent 78a328fb19
commit fad5f62031
8 changed files with 38 additions and 32 deletions
+15 -8
View File
@@ -81,15 +81,22 @@ export function getMessageTypeName(type: MessageType | number): string {
}
/**
* 聊天平台枚举
* 聊天平台类型(字符串,允许任意值)
* 常见平台示例:qq, weixin, discord, whatsapp 等
* 合并多平台记录时使用 'mixed'
*/
export enum ChatPlatform {
QQ = 'qq',
WECHAT = 'wechat',
DISCORD = 'discord',
MIXED = 'mixed', // 合并的多平台聊天记录
UNKNOWN = 'unknown',
}
export type ChatPlatform = string
/**
* 预定义的常用平台值
*/
export const KNOWN_PLATFORMS = {
QQ: 'qq',
WECHAT: 'weixin',
DISCORD: 'discord',
WHATSAPP: 'whatsapp',
UNKNOWN: 'unknown',
} as const
/**
* 聊天类型枚举