Skip to content

fix(feishu): skip empty random_reaction_emoji entries#2131

Merged
yinwm merged 1 commit intosipeed:mainfrom
imalasong:pr/3
Mar 30, 2026
Merged

fix(feishu): skip empty random_reaction_emoji entries#2131
yinwm merged 1 commit intosipeed:mainfrom
imalasong:pr/3

Conversation

@imalasong
Copy link
Copy Markdown
Contributor

📝 Description

Feishu returns 231001 when emoji_type is empty. Config slices like ["", "Pin"] could randomly select an empty string; filter and trim entries and fall back to Pin when none remain.

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

📚 Technical Context (Skip for Docs)

  • Reference URL:
  • Reasoning:

🧪 Test Environment

  • Hardware:
  • OS:
  • Model/Provider:
  • Channels:

📸 Evidence (Optional)

Click to view Logs/Screenshots

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

Feishu returns 231001 when emoji_type is empty. Config slices like
["", "Pin"] could randomly select an empty string; filter and
trim entries and fall back to Pin when none remain.

Made-with: Cursor
@sipeed-bot sipeed-bot bot added type: bug Something isn't working domain: channel go Pull requests that update go code labels Mar 28, 2026
Copy link
Copy Markdown
Collaborator

@yinwm yinwm left a comment

Choose a reason for hiding this comment

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

LGTM — clean defensive fix for the empty emoji edge case. The TrimSpace + fallback pattern is solid and backward-compatible. One non-blocking suggestion: consider adding a unit test for the emoji selection logic covering empty/all-whitespace/mixed configs to prevent regression.

@yinwm yinwm merged commit 803b8bc into sipeed:main Mar 30, 2026
4 checks passed
@sipeed-bot
Copy link
Copy Markdown

sipeed-bot bot commented Apr 2, 2026

@imalasong 飞书这个 emoji_type 为空时返回 231001 的边缘情况确实坑,加上 trim + fallback 处理之后逻辑清晰多了,感谢修复!

我们正在组建 PicoClaw Dev Group Discord 群,方便大家交流协作。感兴趣的话发邮件到 support@sipeed.com,主题写 [Join PicoClaw Dev Group] + 你的 GitHub 账号,我们会把邀请链接发过去!

ra1phdd pushed a commit to ra1phdd/picoclaw-pkg that referenced this pull request Apr 12, 2026
fix(feishu): skip empty random_reaction_emoji entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: channel go Pull requests that update go code type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants