Skip to content

fix(channel): enable session lookup for announce target in multi-account setups#409

Open
skerava wants to merge 1 commit into
larksuite:mainfrom
skerava:fix/announce-target-multi-account
Open

fix(channel): enable session lookup for announce target in multi-account setups#409
skerava wants to merge 1 commit into
larksuite:mainfrom
skerava:fix/announce-target-multi-account

Conversation

@skerava
Copy link
Copy Markdown

@skerava skerava commented Apr 10, 2026

Summary

In multi-account Feishu configurations, sessions_send announce delivery fails because resolveAnnounceTarget() takes a fast path that parses the session key but omits accountId, causing the outbound path to fall through to the default account — which has no credentials when appId/appSecret are configured per-account only.

Error: LarkClient[default]: appId and appSecret are required

This adds preferSessionLookupForAnnounceTarget: true to the channel plugin meta so the session-store lookup path is used, which correctly resolves accountId from deliveryContext.

Changes

One-line addition in src/channel/plugin.ts:

  meta: {
    ...meta,
+   preferSessionLookupForAnnounceTarget: true,
  },

Test plan

  • pnpm typecheck passes
  • pnpm lint passes (0 errors; 21 pre-existing warnings unchanged)
  • pnpm format:check passes
  • pnpm test passes (17 test files, 153 tests)
  • Manual: verified on production multi-account Feishu setup — sessions_send announce delivery succeeds with correct account credentials

…unt setups

In multi-account Feishu configurations, resolveAnnounceTarget() takes a
fast path that parses the session key but omits accountId. This causes
announce delivery to fail with "LarkClient[default]: appId and appSecret
are required" when credentials are configured per-account only.

Add preferSessionLookupForAnnounceTarget: true to the channel plugin meta
so the session-store lookup path is used, which correctly resolves
accountId from deliveryContext.
@skerava
Copy link
Copy Markdown
Author

skerava commented Apr 10, 2026

related issue: #407

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 10, 2026

CLA assistant check
All committers have signed the CLA.

@skerava
Copy link
Copy Markdown
Author

skerava commented Apr 28, 2026

any comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants