fix(channel): enable session lookup for announce target in multi-account setups#409
Open
skerava wants to merge 1 commit into
Open
fix(channel): enable session lookup for announce target in multi-account setups#409skerava wants to merge 1 commit into
skerava wants to merge 1 commit into
Conversation
…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.
Author
|
related issue: #407 |
Author
|
any comment? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In multi-account Feishu configurations,
sessions_sendannounce delivery fails becauseresolveAnnounceTarget()takes a fast path that parses the session key but omitsaccountId, causing the outbound path to fall through to the default account — which has no credentials whenappId/appSecretare configured per-account only.Error:
LarkClient[default]: appId and appSecret are requiredThis adds
preferSessionLookupForAnnounceTarget: trueto the channel plugin meta so the session-store lookup path is used, which correctly resolvesaccountIdfromdeliveryContext.Changes
One-line addition in
src/channel/plugin.ts:meta: { ...meta, + preferSessionLookupForAnnounceTarget: true, },Test plan
pnpm typecheckpassespnpm lintpasses (0 errors; 21 pre-existing warnings unchanged)pnpm format:checkpassespnpm testpasses (17 test files, 153 tests)sessions_sendannounce delivery succeeds with correct account credentials