惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
J
Java Code Geeks
有赞技术团队
有赞技术团队
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
G
Google Developers Blog
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
SegmentFault 最新的问题
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
腾讯CDC
V
Visual Studio Blog
博客园 - 【当耐特】
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
L
LangChain Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(feishu): accept v2 card action callbacks · openclaw/o...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -183,53 +183,54 @@ function parseFeishuBotRemovedChatId(value: unknown): string | null {

183183

return readString(value.chat_id) ?? null;

184184

}

185185186+

function firstString(...values: unknown[]): string | undefined {

187+

for (const value of values) {

188+

const stringValue = readString(value);

189+

const trimmed = stringValue?.trim();

190+

if (trimmed) {

191+

return trimmed;

192+

}

193+

}

194+

return undefined;

195+

}

196+186197

function parseFeishuCardActionEventPayload(value: unknown): FeishuCardActionEvent | null {

187198

if (!isRecord(value)) {

188199

return null;

189200

}

190-

const operator = value.operator;

201+

const operator = isRecord(value.operator) ? value.operator : {};

191202

const action = value.action;

192-

const context = value.context;

193-

if (!isRecord(operator) || !isRecord(action) || !isRecord(context)) {

203+

const context = isRecord(value.context) ? value.context : {};

204+

if (!isRecord(action)) {

194205

return null;

195206

}

196207

const token = readString(value.token);

197-

const openId = readString(operator.open_id);

198-

const userId = readString(operator.user_id);

199-

const unionId = readString(operator.union_id);

208+

const openId = firstString(operator.open_id, value.open_id, context.open_id);

209+

const userId = firstString(operator.user_id, value.user_id, context.user_id);

210+

const unionId = firstString(operator.union_id);

200211

const tag = readString(action.tag);

201212

const actionValue = action.value;

202-

const contextOpenId = readString(context.open_id);

203-

const contextUserId = readString(context.user_id);

204-

const chatId = readString(context.chat_id);

205-

if (

206-

!token ||

207-

!openId ||

208-

!userId ||

209-

!unionId ||

210-

!tag ||

211-

!isRecord(actionValue) ||

212-

!contextOpenId ||

213-

!contextUserId ||

214-

!chatId

215-

) {

213+

const contextOpenId = firstString(context.open_id, openId);

214+

const contextUserId = firstString(context.user_id, userId);

215+

const chatId = firstString(context.chat_id, context.open_chat_id);

216+

if (!token || !openId || !tag || !isRecord(actionValue)) {

216217

return null;

217218

}

218219

return {

219220

operator: {

220221

open_id: openId,

221-

user_id: userId,

222-

union_id: unionId,

222+

...(userId ? { user_id: userId } : {}),

223+

...(unionId ? { union_id: unionId } : {}),

223224

},

224225

token,

225226

action: {

226227

value: actionValue,

227228

tag,

228229

},

229230

context: {

230-

open_id: contextOpenId,

231-

user_id: contextUserId,

232-

chat_id: chatId,

231+

...(contextOpenId ? { open_id: contextOpenId } : {}),

232+

...(contextUserId ? { user_id: contextUserId } : {}),

233+

...(chatId ? { chat_id: chatId } : {}),

233234

},

234235

};

235236

}