Help contribute to the Incident Management Plugin!
Right now, the slash command /incident list behaves equally in mobile and webapp: it posts an ephemeral message with a list of the 10 most recent ongoing incidents that the user is part of.
We need to change the behaviour when the command is issued from the webapp: in that case, we can simply open the RHS with the incident list view.
(Checking for mobile can be easily accomplished with pluginAPI.Session.IsMobileApp(), which returns true only if the user is on a mobile app)
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.
Hi, I am interested! Can you assign this to me?
Hi I have studied the code base of the plugin and have some general thought. Please let me know if I am on the right track!
In index.tsx, the makeSlashCommandHook is registered as the call back for slash command input from the user. So what I need to do is to add a new if statement inslash_command.ts to check if the messageTrimmed starts with '/incident list', and then check the platform of user using pluginAPI.Session.IsMobileApp(). If the user is using the Mobile platform return Promise.resolve({message, args}); else dispatch toggleRHS()and return Promise.resolve({}) to let the server ignore this command.
Please review this pull request! Thank you!
https://github.com/mattermost/mattermost-plugin-incident-management/pull/412
Most helpful comment
Hi, I am interested! Can you assign this to me?