Skip to content

[withdrawn] PR #31533 - #31533

Closed
e-shizz wants to merge 1 commit into
NousResearch:mainfrom
e-shizz:fix/matrix-bang-command-prefix
Closed

[withdrawn] PR #31533#31533
e-shizz wants to merge 1 commit into
NousResearch:mainfrom
e-shizz:fix/matrix-bang-command-prefix

Conversation

@e-shizz

@e-shizz e-shizz commented May 24, 2026

Copy link
Copy Markdown

Withdrawn by author. The source fork has been removed.

@e-shizz
e-shizz force-pushed the fix/matrix-bang-command-prefix branch 2 times, most recently from b0690a2 to 90271fd Compare May 24, 2026 15:04
@e-shizz e-shizz changed the title fix(gateway): recognise Matrix '!' prefix in MessageEvent command parsing docs(matrix): document '!' prefix as Matrix command convention May 24, 2026
@alt-glitch alt-glitch added type/docs Documentation improvements P3 Low — cosmetic, nice to have platform/matrix Matrix adapter (E2EE) labels May 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to open PRs #28025 and #28710 which implement bang-prefix normalization in code (not just docs). This is a complementary docs-only change.

@e-shizz
e-shizz force-pushed the fix/matrix-bang-command-prefix branch from 90271fd to a59b80e Compare May 24, 2026 15:15
@e-shizz e-shizz changed the title docs(matrix): document '!' prefix as Matrix command convention fix(matrix): rewrite '!' prefix to '/' so commands dispatch correctly May 24, 2026
Matrix uses '!' as its bot command prefix convention (e.g. !sethome,
!help), but the core command dispatch (MessageEvent.get_command())
only recognises the '/' prefix. This caused all '!' commands to be
silently treated as regular user text.

Fix: rewrite '!' → '/' in the Matrix adapter's text message handler
before creating the MessageEvent. Same pattern as the Slack adapter's
existing workaround (slack.py:1804).

Also updates the Matrix setup docs to recommend '!' as the primary
command prefix, noting that '/' also works.
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the Matrix command-prefix report and documentation update. This automated hermes-sweeper review found the requested behavior is already implemented on current main.

  • plugins/platforms/matrix/adapter.py:194-204 resolves known !command aliases to dispatchable /command text while retaining ordinary exclamations as chat text.
  • plugins/platforms/matrix/adapter.py:2722-2765 applies that normalization before dispatch, including after Matrix reply-fallback stripping.
  • tests/gateway/test_matrix.py:745-865 covers known command dispatch, arguments, unknown bang text, mention gating, skill commands, and quoted replies.
  • website/docs/user-guide/messaging/matrix.md:530-531 already documents !sethome for clients that intercept slash commands.
  • This shipped through 0022e94d749b9e5023c765dc63d6bbcc0e684c72 and its robustness follow-up a1264e9967ed4cbf4b6a60809628c197053bdf42, included in v2026.6.5.

The May 24 discussion’s related bang-prefix work is therefore covered by the current, more complete implementation.

@teknium1 teknium1 closed this Jul 13, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 13, 2026
@e-shizz e-shizz changed the title fix(matrix): rewrite '!' prefix to '/' so commands dispatch correctly [withdrawn] PR #31533 Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have platform/matrix Matrix adapter (E2EE) sweeper:implemented-on-main Sweeper: behavior already present on current main type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants