Skip to content

fix: handle mention-only messages - #37

Merged
yunfanye merged 1 commit into
rome-os:mainfrom
JSerFeng:codex/fix-feishu-mention-only-message
Aug 26, 2026
Merged

yunfanye merged 1 commit into
rome-os:mainfrom
JSerFeng:codex/fix-feishu-mention-only-message

Conversation

@JSerFeng

@JSerFeng JSerFeng commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Rome prompted me to mention it in a Lark group to bind that group. I mentioned the bot without adding any text, but Rome did not respond.

The Lark SDK normalizes an @-only text message to an empty content string. The Feishu adapter treated that event like an unsupported media-only message and dropped it. An @-only text message now enters the normal inbound path as hello.

Just an idea, close this at any time if there is a better solution, as I'm not expert of agent development

@JSerFeng
JSerFeng marked this pull request as draft August 25, 2026 07:06
@JSerFeng JSerFeng changed the title fix(feishu): handle mention-only messages fix: handle mention-only messages Aug 25, 2026

@yunfanye yunfanye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: ✅ APPROVE

This PR handles the Feishu/Lark SDK’s mention-only normalization at the provider boundary: an empty normalized text event that mentions the bot becomes hello, while empty media events remain dropped. I fully reviewed both changed files, traced delivery through the Feishu connection integration and inbox message hook, and verified the pinned SDK’s normalization behavior; the design stays provider-specific and does not alter shared contracts.

Validation passed with Biome on both changed files, the full @rome/core typecheck, and feishu.test.ts (30 tests).

Verdict: APPROVE — The change is narrowly scoped, preserves existing media filtering and mention policy, and adds a regression test that covers the reported behavior.

No issues found. Code looks good!


Automated review by RomeOS Code Review · commit db04acd

@yunfanye
yunfanye marked this pull request as ready for review August 26, 2026 05:08
@yunfanye

Copy link
Copy Markdown
Contributor

Merging this fix as written so mention-only messages stop disappearing.

A follow-up should preserve the visible mention as @${this.channel.botIdentity?.name ?? "Rome"} rather than rewrite it to hello. That keeps the stored transcript faithful to what the user sent. The same normalization should cover Discord, where stripping a bot-only mention also leaves an empty message.

@yunfanye
yunfanye merged commit f774082 into rome-os:main Aug 26, 2026
8 of 16 checks passed
@yunfanye

Copy link
Copy Markdown
Contributor

Follow-up opened in #54. It preserves bare mentions as @<bot name> for both Feishu/Lark and Discord while keeping normal addressed prose clean.

@zoolsher

Copy link
Copy Markdown
Contributor

@JSerFeng Thanks for your contribution!

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.

3 participants