mmctl
mmctl copied to clipboard
[ Feature Request ] `mmctl ping` to send a DM
I have a bash script that I use to send me a Mattermost notification to let me know that long processes have completed. It would be great to have this in mmctl
. Here's how I see it working:
make dist; mmctl ping "make dist complete"
It would also be nice to be able to append STDIN
as a code block to the message that's sent, e.g.:
tail -n3 mattermost.log > mmctl ping "Here's the last three lines of the Mattermost log:"
Would produce a post like this:
Here's the last three lines of the Mattermost log:
```
2021-08-12T23:07:45.163Z debug wsapi/websocket_handler.go:25 Websocket request {"action": "ping"}
2021-08-12T23:08:00.923Z debug web/handlers.go:107 Received HTTP request {"method": "POST", "url": "/api/v4/users/status/ids", "request_id": "ggk78sfk6brp8rukihp4myt1cc", "host": "mattermost.example.com", "scheme": "https", "status_code": "200"}
2021-08-12T23:08:15.163Z debug wsapi/websocket_handler.go:25 Websocket request {"action": "ping"}
```
Usage: mmctl ping [message] [flags]
Examples:
ping 'Time to make the donuts!'
ping 'Open the pod bay doors' -u hal
Flags:
-u
, --user
The username or ID of the user to whom to send the direct message
Added a ticket to send a DM with a much straightforward fashion. https://mattermost.atlassian.net/browse/MM-40525
@icelander Please can you share the script
@isacikgoz This seem related issue to https://github.com/mattermost/mattermost-server/issues/19914
Tracking via https://github.com/mattermost/mattermost/issues/19914