Issue Type: Bug
Summary:
When a user types a slash command that is not registered on the server (e.g., /stop), the Mattermost web client displays a small “send as plain text” link below the input field, allowing the command to be sent as plain text. The Android app provides no such fallback. Unregistered slash commands are simply blocked with no way to send them as text.
Environment:
- Mattermost Android app (reproduced on current release)
- Server: any self-hosted Mattermost instance with integrations that do not register slash commands at startup
Steps to Reproduce:
- Connect a bot or agent integration that listens for specific text patterns (e.g.,
/stop) but does not register those as slash commands via the Mattermost API - On the web client, type
/stopand observe the “send as plain text” prompt appears below the input area – clicking the hypertext sends the message as plain text - On the Android app, type
/stopand observe there is no “send as message” option; the command is treated as an unregistered slash command and cannot be sent at all
Expected Behavior:
The Android app should offer a “send as plain text” fallback when a slash command is not recognized, matching the behavior of the web client. This could be a tappable suggestion below the input field or a dialog, consistent with the web UX.
Actual Behavior:
Users sending unregistered slash commands on Android have no option to send as plain text.
Operational Safety Impact:
This is not merely a UX inconsistency. Many agent/bot integrations (including Hermes, a self-hosted AI agent framework) use slash commands as control signals without formally registering them with the Mattermost server. The /stop command is a critical safety mechanism: when an agent run goes haywire, /stop is the designated emergency interrupt. A user who only has their phone available cannot send this command, which means they cannot halt a runaway agent from mobile. This creates a real operational safety gap.
Additional Context:
- The web client’s “send as message” link is already small and easy to miss (tiny font below the input box), but at least it exists. The Android app has nothing at all.
- This affects any integration that relies on text-based command patterns rather than Mattermost’s formal slash command registration API. Telegram’s bot framework handles this differently by allowing bots to register commands at startup, which prevents the conflict entirely. Mattermost’s design forces a choice between formal slash command registration (which reserves the command namespace server-wide) and text-pattern matching (which is blocked on mobile).
- A related improvement would be for the web client to make the “send as message” fallback more prominent rather than hiding it in micro-font, but the Android issue is more severe because the fallback simply does not exist.
Possible Fix:
When a slash command does not match any registered command on the server, show a “Send as message” option on Android similar to the web client. At minimum, this restores the user’s ability to send arbitrary text starting with /.