feat: merge Feishu/Lark into unified adapter with region toggle#329
Open
pluginmd wants to merge 1 commit intoRightNow-AI:mainfrom
Open
feat: merge Feishu/Lark into unified adapter with region toggle#329pluginmd wants to merge 1 commit intoRightNow-AI:mainfrom
pluginmd wants to merge 1 commit intoRightNow-AI:mainfrom
Conversation
Merge lark.rs features (dedup, encryption, group filtering, rich text parsing) into feishu.rs with FeishuRegion toggle (cn/intl). Single [channels.feishu] config handles both domestic Feishu and international Lark via region field. - Expand FeishuConfig: region, webhook_path, verification_token, encrypt_key_env, bot_names - Add FeishuRegion enum with domain switching (open.feishu.cn / open.larksuite.com) - Add AES-256-CBC event decryption, message/event dedup, group chat filtering - Update channel_bridge.rs wiring for full config - Update routes.rs ChannelMeta with new UI fields (region basic, rest advanced) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Merge
lark.rsintofeishu.rs— one unified adapter with region toggle instead of two separate channels.Why?
Feishu (飞书) and Lark are the same product by ByteDance, just different regions:
open.feishu.cnopen.larksuite.comThe only difference is the base URL domain. Maintaining two separate adapters (
feishu.rs+lark.rs) was redundant — same code, different domain string.What changed
Single
[channels.feishu]config withregionfield ("cn"or"intl") controls which API domain is used:region = "cn"→open.feishu.cn(Feishu domestic, default)region = "intl"→open.larksuite.com(Lark international)Features merged from lark.rs into feishu.rs
post(rich text) messages with locale fallback@_user_1placeholders from message textChanges
crates/openfang-channels/src/feishu.rsFeishuRegionenum with domain switchingcrates/openfang-types/src/config.rsFeishuConfig: +5 fields (region,webhook_path,verification_token,encrypt_key_env,bot_names)crates/openfang-api/src/channel_bridge.rsFeishuAdapter::with_config()crates/openfang-api/src/routes.rsChannelMetaUI — region as basic field, 6 new advanced fieldsConfig example
Test plan
cargo build --workspace --lib— compilescargo test --workspace— all tests passcargo clippy -p openfang-channels -p openfang-api -p openfang-types -- -D warnings— zero warnings/api/channelsreturns all 9 Feishu fields correctly🤖 Generated with Claude Code