namespace Common.Notify { /// /// 飞书自建应用配置(用于"手机号 → open_id"转换) /// 飞书群机器人 webhook 只能发文本、无法用手机号 @ 人,必须借助自建应用凭证调通讯录接口换取 open_id。 /// 由 Program.cs 启动时从 appsettings.json 的 Feishu 节读入;未配置时相关功能自动降级。 /// public static class FeishuConfig { /// 飞书自建应用 App ID(cli_ 开头) public static string AppId { get; private set; } = string.Empty; /// 飞书自建应用 App Secret public static string AppSecret { get; private set; } = string.Empty; /// 是否已配置(未配置时手机号无法转 open_id,降级为仅支持直接填 open_id / all) public static bool IsConfigured => !string.IsNullOrWhiteSpace(AppId) && !string.IsNullOrWhiteSpace(AppSecret); /// 初始化飞书应用配置 public static void Init(string appId, string appSecret) { AppId = appId ?? string.Empty; AppSecret = appSecret ?? string.Empty; } } }