Skip to content

fix: preserve outbound Slack user mentions - #10448

Merged
Soulter merged 1 commit into
AstrBotDevs:masterfrom
wcqqq1214:fix/slack-outbound-mentions
Oct 9, 2026
Merged

Soulter merged 1 commit into
AstrBotDevs:masterfrom
wcqqq1214:fix/slack-outbound-mentions

Conversation

@wcqqq1214

@wcqqq1214 wcqqq1214 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Slack silently drops user mentions generated by reply_with_mention and send_message_to_user, while sending the remaining content successfully.

Modifications / 改动点

Serialize At components as <@USER_ID> alongside text in Slack blocks and preserve them in plain-text fallback replies. Five added lines in slack_event.py.

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果

Verification steps: enable reply_with_mention (“回复时 @ 发送人”) in the active configuration, send @Astrbot /sid in a Slack channel, then call send_message_to_user with mention_user and plain text. Both replies should contain a clickable user mention.

Ruff formatting/lint passed; 71 existing Slack tests passed. Patched-container serialization smoke test passed.

Before

Before

After

After

Checklist / 检查清单

  • 😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
    / 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。

  • 👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
    / 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。

  • 📚 I checked the affected WebUI instructions and screenshots in docs/zh and docs/en against the changed navigation, page structure, and labels, and updated them in this PR (or explained why no documentation update is needed). For renamed, moved, or merged entry points, I included an old entry → new entry mapping in the documentation and changelog.
    / 我已对照变化后的 WebUI 入口、页面结构和术语,核对并在本 PR 中更新 docs/zh 和 docs/en 的相关操作说明与截图(或说明无需更新文档的原因)。入口改名、移动或合并时,已在文档和 changelog 中补充 旧入口 → 新入口 对照。

  • 🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
    / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到 requirements.txt 和 pyproject.toml 文件相应位置。

  • 😮 My changes do not introduce malicious code.
    / 我的更改没有引入恶意代码。

Summary by Sourcery

Bug Fixes:

  • Preserve clickable Slack user mentions in block messages and plain-text fallback replies sent by mention-enabled messaging APIs.

@wcqqq1214
wcqqq1214 marked this pull request as ready for review October 7, 2026 20:20

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@Soulter
Soulter merged commit 03ce652 into AstrBotDevs:master Oct 9, 2026
23 checks passed
@wcqqq1214
wcqqq1214 deleted the fix/slack-outbound-mentions branch October 9, 2026 08:34
elecvoid243 added a commit to elecvoid243/AstrBot_for_spzx that referenced this pull request Oct 11, 2026
Port 81 compatible upstream patches through fb49dfa.
Preserve local chat scrolling, agent extensions, API behavior, and release versions.
Adapt queued-request tests to local stage fields and resolve duplicate context arguments.

Defer 63aa363 (AstrBotDevs#10319): plugin Views tests/docs require the excluded Pages-to-Views migration.

Validation:
- Ruff checks, dashboard typecheck, and production build passed.
- Frontend: 1453 passed; 10 failures reproduced on the pre-integration baseline.
- Backend: 1091 passed; 2 queue/OpenAPI failures reproduced on the pre-integration baseline.
- Backend tests used SQLModel 0.0.31 and SQLAlchemy 2.0.44 in an isolated temporary environment.

Upstream commits:
5950d7c chore(deps): bump the github-actions group with 2 updates (AstrBotDevs#10088)
553096b docs: sync guides with current WebUI navigation (AstrBotDevs#10093)
763a5ee fix(cron): say who owns a task instead of returning an empty list (AstrBotDevs#10104)
e0aa8d3 fix: clarify local file access menu descriptions
2704b4c fix: tell the model when an animation becomes a frame montage (AstrBotDevs#10119)
bb79c08 fix(dashboard): drop stale exclude_ids hardcode hiding conversations (AstrBotDevs#10129)
f097600 fix(gemini): keep narration streamed before a tool call in history (AstrBotDevs#10132)
8492df4 fix: serialize Azure TTS backend client lifetimes (AstrBotDevs#10101)
0812616 fix: propagate Xinference rerank failures instead of returning empty results (AstrBotDevs#10051)
9c73295 fix: preserve scheduled reminders when an edit is invalid (AstrBotDevs#10075)
2782454 fix: use GitHub HEAD when repository branch is unspecified (AstrBotDevs#10080)
dae7c24 fix(provider): recognize thinking tags in compatible completions (AstrBotDevs#10116)
b13338d fix(dashboard): restore readable text and switch contrast in fullscreen console (AstrBotDevs#10135)
774cc94 docs: name the dashboard host/port environment variables and their precedence (AstrBotDevs#10095)
54c98e8 fix: resolve each OneBot file segment by its own ID (AstrBotDevs#10098)
b065505 fix: clean up invalid materialized images (AstrBotDevs#10090)
96d9504 docs: explain HTTP proxy address when AstrBot runs in Docker (AstrBotDevs#10162)
8b5e24b fix: respect session plugin filters in cron agents (AstrBotDevs#10163)
67c74b7 feat: gzip dashboard static js, css, and html (AstrBotDevs#10187)
2b6b31a fix: refresh queued conversation history under the session lock (AstrBotDevs#10238)
fbf5286 feat: forward extra_user_content_parts through Context.tool_loop_agent (AstrBotDevs#10237)
559b171 fix(weixin_oc): keep a cleared timeout field from disabling the HTTP timeout (AstrBotDevs#10229)
14835b5 fix(respond): keep an unusable segmented-reply log base from dropping the reply (AstrBotDevs#10231)
a426808 fix: skip queued LLM requests after disabling (AstrBotDevs#10234)
61ba3a2 fix: estimate emoji token cost above the plain text rate (AstrBotDevs#10216)
0531575 fix: increase cron misfire grace time to 300 seconds (AstrBotDevs#10183)
42ad277 chore(deps): bump the github-actions group with 4 updates (AstrBotDevs#10184)
1a59156 feat(dashboard): add search to Skills and MCP pages (AstrBotDevs#10217)
5fcaf69 fix: compare platform message history cutoff in UTC (AstrBotDevs#10246)
c8a07f7 fix(platform): keep the Satori heartbeat and reconnect delays from being disabled by a cleared field (AstrBotDevs#10248)
ae5a155 fix(dashboard): fix dark mode icons and platform template order (AstrBotDevs#10061)
e99432c fix(qqofficial): restore @ mentions in group messages (AstrBotDevs#9705)
5b04f13 perf: skip state allocation when rate limiting is disabled (AstrBotDevs#10270)
e19954b fix(stats): prevent timers from starting after unmount (AstrBotDevs#10272)
1c5dd91 perf(session): skip unused alias lookup when listing rules (AstrBotDevs#10273)
9c6b603 perf(trace): sort records only for updated spans (AstrBotDevs#10274)
b53999e fix: support Windows long paths during plugin archive extraction (AstrBotDevs#10193)
5a4745f docs: rename dev QQ group to chit-chat group and add community email (AstrBotDevs#10282)
fe29538 fix: update remaining legacy AstrBot icons (AstrBotDevs#10278)
6d50e1e chore(deps): bump github/codeql-action in the github-actions group (AstrBotDevs#10265)
ac515d9 docs: add slider key to plugin dev docs (AstrBotDevs#10289)
73b4fc9 fix: correct shields.io badge links in README files (AstrBotDevs#10290)
6a2186b fix: replace DeepWiki badge with shields.io in README files (AstrBotDevs#10299)
553b10f fix(dashboard): use the primary color for the config test-chat button (AstrBotDevs#10309)
9d4f523 feat(dashboard): edit config profiles from a side drawer in the bot editor (AstrBotDevs#10310)
9f65a01 fix: reuse logo tokens and refresh expired platform cache (AstrBotDevs#10294)
ab7de72 feat(dashboard): add log search and keyword highlighting to console (AstrBotDevs#10327)
d399090 fix(webui): use colored DeepSeek provider icon (AstrBotDevs#10332)
a6265fa fix: degrade unresolvable voice attachments instead of failing the turn (AstrBotDevs#10337)
1245979 fix(dashboard): enforce session ownership on chat send path (AstrBotDevs#10346)
44b5c1b feat(dashboard): show source badge for skills in skills list (AstrBotDevs#10339)
95af435 fix(dashboard): restore plugin README anchor navigation (AstrBotDevs#10341)
3d80dd3 fix: clean up session waiter registrations only once (AstrBotDevs#10344) (AstrBotDevs#10347)
ac4df99 fix(dashboard): align fullscreen log search with dark theme (AstrBotDevs#10351)
6a4decd fix: handle UTF-16 offsets in Telegram mentions (AstrBotDevs#10367)
f7f3c71 fix: leave Telegram bot token empty by default (AstrBotDevs#10365)
2f889d2 fix: preserve child folders when deleting persona folders (AstrBotDevs#10361)
de31bbe fix: close FishAudio TTS HTTP client after requests (AstrBotDevs#10358)
4c037c4 fix: resolve remote Slack file URLs before upload (AstrBotDevs#10355)
dfaaca1 docs: update Slack setup steps and screenshot (AstrBotDevs#10353)
3861730 fix(telegram): match bot mentions case-insensitively (AstrBotDevs#10399)
57ac1d8 fix: preserve Slack code block and quote text (AstrBotDevs#10380)
64430fa docs: sync Lark/Feishu guide with current capabilities and permissions (AstrBotDevs#10400)
c1356bb fix(dify): handle CRLF event separators in streaming responses (AstrBotDevs#10392)
900a700 fix: match command group names as whole words (AstrBotDevs#10372)
55c2dd3 feat: remember the last opened tab on the Data & Logs page (AstrBotDevs#10251)
e1d30f3 fix(provider): replace retired gemini-embedding-exp-03-07 default with gemini-embedding-001 (AstrBotDevs#10393)
2de9059 fix: avoid blocking audio format probes (AstrBotDevs#10055)
65cbe98 feat: ship astrbot CLI in Docker image for in-container password reset (AstrBotDevs#10442)
cae8f1d feat(dashboard): add distinct hints for local permission access modes (AstrBotDevs#10444)
30820a4 fix(provider): keep Anthropic tool calls whose streamed input is empty (AstrBotDevs#10432)
6b2e417 fix(provider): merge custom server tools with registered tools in Anthropic requests (AstrBotDevs#10437)
d8ef9dd fix: send Discord video components as attachments (AstrBotDevs#10423)
5994167 fix: preserve links and mentions in Slack lists (AstrBotDevs#10447)
03ce652 fix: preserve outbound Slack user mentions (AstrBotDevs#10448)
d2fb912 fix: prevent Discord self-reply loops (AstrBotDevs#10425)
b01285a chore(github): add plugin submission links to issue template config (AstrBotDevs#10455)
c6f4150 fix: avoid recording cron sends without a matching platform (AstrBotDevs#10468)
28a10c1 fix: warn when a background task result is not sent to the user (AstrBotDevs#10398)
845517e chore(github): update plugin submission links in issue template config (AstrBotDevs#10472)
fb49dfa fix(dashboard): update plugin market submit link and label (AstrBotDevs#10471)
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