At now when I try to send message via Riot, that starting with slash (for example, linux path to file like /home/murz/file.txt or path of code like /* code */ echo "hello world"; /* code end */) - I got the error:
Command error
Unrecognised command: /home/murz/file.txt
So I must add trailing space or other symbol for send this path to file.
I understand that Riot have commands that sends via trailing slash, but this broke ability to send some messages without manual editing.
Will be good if Riot try to recognize the command with slash, and if there are no exact matches - send message to room, instead of stop sending process and shows the error.
I'd hate that, what if you mistype a command that has some info you wouldn't really want others to see.
The right way to do this, as IRC Clients have done for a looong time and how Riot already does it is to
Prepend a /
to make it //home.... and that will send the message exactly as you want it
though might be broken on RTE right now, think its fixed in Develop
IRC with / commands is too old protocol, so most of new users, that moved to Matrix not from IRC, but from XMPP, Telegram, Skype and other modern messengers, don't know about those commands and will be seriosly confused when see Command error window in Riot on message with trailing slash instead of send process.
Even me, that was be active user of IRC about 10 years ago (and moved to XMPP from this protocol), forgot this trick that I can add additional / to send message, and confused with this error message - solve the problem via adding spaces instead of next slash.
So best solution will be add option "Enable IRC-style commands with trailing /" in Riot settings and recognize commands only with enabled option.
Or as workaround for this problem - we can add button "Force send as message" to current error popup window, that automatically prepend additional / to message and send the message to room, or text notice that user can prepend / for succesfully send current message instead of execute command.
Our company actively send link to files like /mnt/sharedfolder/projectfile.odt and after moving all conversations from XMPP to Matrix&Riot - every user of our company already asks me - how to solve the problem with sending links to file? And no one can solve this problem without my help, even don't try to adding space or other symbol before first slash, because they are not programmers and don't know anything about slash-commands and source of this problem. So this is bad default behavior of Riot for not-improved IRC users.
I like the solutions you suggested, a way to disable SlashCommands and a way to send the message anyway
We do need a nicer way to handle this, and as you say the current error popup could be a lot more useful.
Instead of saying "Unrecognised command: /whatever" we could say:
Sorry,
/whateveris not a valid command :cry:Riot.im interprets messages that start with a
/as commands. If you want to send/whateverto the room as a message, add an extra/at the beginning, e.g.//whatever.Alternatively you can click here to send ```/whatever```` to the room now.
Obviously we'd need Riot to render '//.....' messages as '/.....', too.
@lampholder //whatever already works to send /whatever (not on /app RTE though)
Yes, text is good, but message text repeats 3 times. Message text can be very long and multiline (even when sending code snippets), so will be good to display them one time:
Your message start with
/that means command instead of message:
[q]full message text with scroll[/q]Riot can't recognize typed command. List of available commands you can look here.
Riot.im interprets messages that start with a
/as commands. If you want to send/whateverto the room as a message, add an extra/at the beginning, e.g.//whatever. Also you can disable recognizing all commands in Riot options.
[button: Return to edit command] [button: Send current text as message]
Also I add link to disable command recognition in Riot settings, if this will added in future.
//whatever already works to send /whatever
This can give problems with sending code snippets starting with comments, like:
// Example of PHP code:
echo "Hello world!";
For solve this problem we can change recognition process to regexp ^/\w+ for work only on messages with one leading slash and word next to them.
This can give problems with sending code snippets starting with comments
Typically that would be in a code block, and not be parsed as a command to begin with. If you wanted to send a line starting with // for other reasons then you'd just enter ///. This rule is simple, consistent, and familiar to users of other chat programs.
For solve this problem we can change recognition process to regexp ^/\w+ for work only on messages with one leading slash and word next to them.
That would be even more confusing than not supporting leading slashes at all; sometimes it would work and sometimes it wouldn't.
If you wanted to send a line starting with // for other reasons then you'd just enter ///. This rule is simple, consistent, and familiar to users of other chat programs.
WAT? This is familiar only for IRC users! All other popular chats (Skype, WhatsAPP, Viber, XMPP, Telegram, Hangouts) don't use slash-commands, and even if they use - I can't remember that they don't allow send messages like /mnt/sharedfolder/projectfile.odt without warnings.
Neoteric users prefers to use nice buttons and menu options instead of remember plaintext commands. Even smiles they select via mouse from list instead of typing.
Issue is still exists with "new, faster, but still experimental composer" too :(
Most helpful comment
WAT? This is familiar only for IRC users! All other popular chats (Skype, WhatsAPP, Viber, XMPP, Telegram, Hangouts) don't use slash-commands, and even if they use - I can't remember that they don't allow send messages like
/mnt/sharedfolder/projectfile.odtwithout warnings.Neoteric users prefers to use nice buttons and menu options instead of remember plaintext commands. Even smiles they select via mouse from list instead of typing.