Mattermost-server: [Help Wanted] [MM-7865] If you type an invalid slash command and attempt to post, offer an option to send it as a message

Created on 20 Feb 2018  路  6Comments  路  Source: mattermost/mattermost-server

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide, specifically for machine setup and for developer workflow.


Notes: Jira ticket

If you type an invalid slash command and attempt to post, offer an option to send it as a message

Repro:
1) Type "/what", hit ENTER

Observed: Error text - Command with a trigger of 'what' not found. To send a message beginning with "/", try adding an empty space at the beginning of the message.

Proposed change:
1) Error text - Command with a trigger of 'what' not found. Click here to send as a message.
2) "Click here to send as a message." is clickable. Clicking the link posts "/what" as a message.
3) "Click here to send as a message." also has focus so that if a user hits ENTER, "/what" is posted as a message.

image

Hard Hackfest TecReactJS

Most helpful comment

I'd like to work on this

All 6 comments

I'd like to work on this

PR here

I some questions regarding this feature.

If the user changes the text after encountering the error:

  • should the error continue displaying?
  • should clicking the "send as message" link clear the edited text?

As of now, the error does continue displaying, and the text is cleared out on forced submission of the error'd text.

Also, currently the invalid command error occurs when the beginning word is just '/' . I want to verify that this is expected behavior since we're looking at invalid commands.

@esethna this was completed for center channel by https://github.com/mattermost/mattermost-webapp/pull/1969. Did we also want to implement it for RHS replies? Currently shows old behavior in RHS, and I didn't see an answer in PR 1969 (Saturn mentioned this too).

I have the feature complete. Would you like me to create a new issue for this?

Thanks @mickmister ! @esethna what's the best way to do this; new issue?

Was this page helpful?
0 / 5 - 0 ratings