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

推荐订阅源

WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
N
Netflix TechBlog - Medium
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
B
Blog
F
Fortinet All Blogs
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
Google Developers Blog
A
About on SuperTechFans
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
MyScale Blog
MyScale Blog
B
Blog RSS Feed

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(discord): preserve room event history until delivery ...
obviyus · 2026-05-17 · via Recent Commits to openclaw:main

@@ -13,6 +13,7 @@ import {

1313

} from "openclaw/plugin-sdk/interactive-runtime";

1414

import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";

1515

import { handleDiscordAction } from "../../action-runtime-api.js";

16+

import { notifyDiscordInboundEventOutboundSuccess } from "../inbound-event-delivery.js";

1617

import {

1718

buildDiscordInteractiveComponents,

1819

buildDiscordPresentationComponents,

@@ -45,6 +46,8 @@ export async function handleDiscordMessageAction(

4546

| "mediaAccess"

4647

| "mediaLocalRoots"

4748

| "mediaReadFile"

49+

| "sessionKey"

50+

| "inboundEventKind"

4851

>,

4952

): Promise<AgentToolResult<unknown>> {

5053

const { action, params, cfg } = ctx;

@@ -54,6 +57,13 @@ export async function handleDiscordMessageAction(

5457

mediaLocalRoots: ctx.mediaLocalRoots,

5558

mediaReadFile: ctx.mediaReadFile,

5659

} as const;

60+

const notifyVisibleOutbound = (to: string, fallbackSessionKey?: string) =>

61+

notifyDiscordInboundEventOutboundSuccess({

62+

sessionKey: ctx.sessionKey ?? fallbackSessionKey ?? undefined,

63+

to,

64+

accountId,

65+

inboundEventKind: ctx.inboundEventKind,

66+

});

57675868

const readTarget = () => {

5969

const target =

@@ -106,7 +116,7 @@ export async function handleDiscordMessageAction(

106116

const sessionKey = readStringParam(params, "__sessionKey");

107117

const agentId = readStringParam(params, "__agentId");

108118

const threadName = readStringParam(params, "threadName");

109-

return await handleDiscordAction(

119+

const result = await handleDiscordAction(

110120

{

111121

action: "sendMessage",

112122

accountId: accountId ?? undefined,

@@ -127,6 +137,8 @@ export async function handleDiscordMessageAction(

127137

cfg,

128138

actionOptions,

129139

);

140+

notifyVisibleOutbound(to, sessionKey);

141+

return result;

130142

}

131143132144

if (action === "upload-file") {

@@ -147,7 +159,7 @@ export async function handleDiscordMessageAction(

147159

const suppressEmbeds = readBooleanParam(params, "suppressEmbeds");

148160

const sessionKey = readStringParam(params, "__sessionKey");

149161

const agentId = readStringParam(params, "__agentId");

150-

return await handleDiscordAction(

162+

const result = await handleDiscordAction(

151163

{

152164

action: "sendMessage",

153165

accountId: accountId ?? undefined,

@@ -164,6 +176,8 @@ export async function handleDiscordMessageAction(

164176

cfg,

165177

actionOptions,

166178

);

179+

notifyVisibleOutbound(to, sessionKey);

180+

return result;

167181

}

168182169183

if (action === "poll") {

@@ -177,7 +191,7 @@ export async function handleDiscordMessageAction(

177191

integer: true,

178192

strict: true,

179193

});

180-

return await handleDiscordAction(

194+

const result = await handleDiscordAction(

181195

{

182196

action: "poll",

183197

accountId: accountId ?? undefined,

@@ -191,6 +205,8 @@ export async function handleDiscordMessageAction(

191205

cfg,

192206

actionOptions,

193207

);

208+

notifyVisibleOutbound(to);

209+

return result;

194210

}

195211196212

if (action === "react") {

@@ -315,7 +331,7 @@ export async function handleDiscordMessageAction(

315331

integer: true,

316332

});

317333

const appliedTags = readStringArrayParam(params, "appliedTags");

318-

return await handleDiscordAction(

334+

const result = await handleDiscordAction(

319335

{

320336

action: "threadCreate",

321337

accountId: accountId ?? undefined,

@@ -329,25 +345,30 @@ export async function handleDiscordMessageAction(

329345

cfg,

330346

actionOptions,

331347

);

348+

notifyVisibleOutbound(resolveChannelId());

349+

return result;

332350

}

333351334352

if (action === "sticker") {

353+

const to = readStringParam(params, "to", { required: true });

335354

const stickerIds =

336355

readStringArrayParam(params, "stickerId", {

337356

required: true,

338357

label: "sticker-id",

339358

}) ?? [];

340-

return await handleDiscordAction(

359+

const result = await handleDiscordAction(

341360

{

342361

action: "sticker",

343362

accountId: accountId ?? undefined,

344-

to: readStringParam(params, "to", { required: true }),

363+

to,

345364

stickerIds,

346365

content: readStringParam(params, "message"),

347366

},

348367

cfg,

349368

actionOptions,

350369

);

370+

notifyVisibleOutbound(to);

371+

return result;

351372

}

352373353374

if (action === "set-presence") {

@@ -371,6 +392,9 @@ export async function handleDiscordMessageAction(

371392

resolveChannelId,

372393

});

373394

if (adminResult !== undefined) {

395+

if (action === "thread-reply") {

396+

notifyVisibleOutbound(readStringParam(params, "threadId") ?? readTarget());

397+

}

374398

return adminResult;

375399

}

376400