feat(feishu): add configurable group response mode

This commit is contained in:
xmanrui 2026-08-22 01:26:29 +08:00
parent 1a86fa5013
commit 9950261a49
19 changed files with 615 additions and 150 deletions

View file

@ -1,6 +1,7 @@
import { createHash } from 'node:crypto';
import { mkdir, readFile, rename, unlink, writeFile } from 'node:fs/promises';
import { dirname } from 'node:path';
import { normalizeFeishuGroupResponseMode } from './group-response-mode.mjs';
export const LEGACY_FEISHU_SECRET_REF = 'DSH_FEISHU_APP_SECRET';
@ -43,6 +44,7 @@ function normalizeBot(value, { legacy = false } = {}) {
botName: cleanString(value.botName),
botOpenId: cleanString(value.botOpenId),
activated: value.activated ?? null,
groupResponseMode: normalizeFeishuGroupResponseMode(value.groupResponseMode),
deletionPending: value.deletionPending === true,
connectedAt: cleanString(value.connectedAt),
createdAt: cleanString(value.createdAt) ?? cleanString(value.connectedAt),