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

推荐订阅源

博客园_首页
C
Check Point Blog
B
Blog RSS Feed
G
Google Developers Blog
H
Help Net Security
博客园 - Franky
Blog — PlanetScale
Blog — PlanetScale
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Recent Announcements
Recent Announcements
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
小众软件
小众软件
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Y
Y Combinator Blog
T
Tailwind CSS Blog
J
Java Code Geeks
MyScale Blog
MyScale 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(slack): default member-info userId to inbound sender ...
stroupaloop · 2026-06-19 · via Recent Commits to openclaw:main

@@ -548,6 +548,108 @@ describe("handleSlackMessageAction", () => {

548548

}),

549549

).rejects.toThrow(/fileId/i);

550550

});

551+552+

it("defaults member-info userId to the inbound sender when omitted", async () => {

553+

const invoke = createInvokeSpy();

554+555+

await handleSlackMessageAction({

556+

providerId: "slack",

557+

ctx: {

558+

action: "member-info",

559+

cfg: {},

560+

params: {},

561+

accountId: "OPS",

562+

requesterAccountId: "ops",

563+

requesterSenderId: "U123",

564+

toolContext: { currentChannelProvider: " Slack " },

565+

} as never,

566+

invoke: invoke as never,

567+

});

568+569+

expect(invoke).toHaveBeenCalledWith(

570+

expect.objectContaining({ action: "memberInfo", userId: "U123" }),

571+

expect.any(Object),

572+

);

573+

});

574+575+

it("defaults member-info userId through the configured default Slack account", async () => {

576+

const invoke = createInvokeSpy();

577+578+

await handleSlackMessageAction({

579+

providerId: "slack",

580+

ctx: {

581+

action: "member-info",

582+

cfg: { channels: { slack: { defaultAccount: "ops", accounts: { ops: {} } } } },

583+

params: {},

584+

requesterAccountId: "OPS",

585+

requesterSenderId: "U123",

586+

toolContext: { currentChannelProvider: "slack" },

587+

} as never,

588+

invoke: invoke as never,

589+

});

590+591+

expect(invoke).toHaveBeenCalledWith(

592+

expect.objectContaining({ action: "memberInfo", userId: "U123" }),

593+

expect.any(Object),

594+

);

595+

});

596+597+

it.each([

598+

["has no inbound sender", { toolContext: { currentChannelProvider: "slack" } }],

599+

["has no source provider", { requesterSenderId: "U123" }],

600+

[

601+

"has no source account",

602+

{

603+

accountId: "default",

604+

requesterSenderId: "U123",

605+

toolContext: { currentChannelProvider: "slack" },

606+

},

607+

],

608+

[

609+

"targets another Slack account",

610+

{

611+

accountId: "other",

612+

requesterAccountId: "default",

613+

requesterSenderId: "U123",

614+

toolContext: { currentChannelProvider: "slack" },

615+

},

616+

],

617+

[

618+

"comes from another provider",

619+

{ requesterSenderId: "U123", toolContext: { currentChannelProvider: "telegram" } },

620+

],

621+

])("rejects member-info without userId when the request %s", async (_label, context) => {

622+

await expect(

623+

handleSlackMessageAction({

624+

providerId: "slack",

625+

ctx: { action: "member-info", cfg: {}, params: {}, ...context } as never,

626+

invoke: createInvokeSpy() as never,

627+

}),

628+

).rejects.toThrow(/member-info requires a userId/i);

629+

});

630+631+

it("prefers an explicit member-info userId over the inbound sender", async () => {

632+

const invoke = createInvokeSpy();

633+634+

await handleSlackMessageAction({

635+

providerId: "slack",

636+

ctx: {

637+

action: "member-info",

638+

cfg: {},

639+

params: { userId: "U999" },

640+

accountId: "other",

641+

requesterAccountId: "default",

642+

requesterSenderId: "U123",

643+

toolContext: { currentChannelProvider: "telegram" },

644+

} as never,

645+

invoke: invoke as never,

646+

});

647+648+

expect(invoke).toHaveBeenCalledWith(

649+

expect.objectContaining({ action: "memberInfo", userId: "U999" }),

650+

expect.any(Object),

651+

);

652+

});

551653

});

552654553655

describe("extractSlackToolSend", () => {